Pull the common portion of the integration tests out into a separate
function, which makes it easier to run the same set of tests on multiple
providers. Then, add separate test suites for the current permissive
provider logic, a yet-to-be-added strict provider, and a static
provider.
Along the way, fix some logical bugs in the tests:
In one test, the assertion is just wrong - the user-supplied config
should be overwriting data supplied via WithDefault.
In another, we're mistakenly drilling down with Value.Get but making
assertions about the top-level data.
In a third, we're making incorrect assertions about the output of a
deep merge. The current provider is correct, so we don't need to skip
the test.
Most importantly, we're needlessly changing the behavior of the YAML
provider when it encounters a type mismatch between lower- and
higher-priority sources. No meaningful merge is possible, and today, the
YAML provider overwrites the lower-priority data with the higher. This
is reasonable, so we should preserve that behavior.
Pull the common portion of the integration tests out into a separate function, which makes it easier to run the same set of tests on multiple providers. Then, add separate test suites for the current permissive provider logic, a yet-to-be-added strict provider, and a static provider.
Along the way, fix some logical bugs in the tests:
WithDefault
.Value.Get
but making assertions about the top-level data.