Files
docker-cli/cli/compose/loader
Sebastiaan van Stijn c18dd2719e cli/compose/loader: TestMarshallConfig: fix duplicate version
The version was originally added in 570ee9cb54,
at the time the `expected` config did not have a `version:` field. A later
refactor in 0cf2e6353a updated the `expected`
config to have a `version:` included. However, the test was not updated,
which now resulted in the test using a compose file with a duplicate version
field:

    version: '3.10'
    version: "3.10"
      services:
        foo:
          build:

This issue was masked by `yaml.Unmarshal()` from `gopkg.in/yaml.v2` which
silently ignores the duplicate, taking the value of the last occurrence. When
upgrading to `gopkg.in/yaml.v3`, the duplicate value resulted in an error:

    yaml: unmarshal errors:
        line 2: mapping key "version" already defined at line 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-17 13:17:50 +01:00
..
2017-04-17 17:40:59 -04:00
2017-04-17 17:40:59 -04:00
2022-09-30 11:59:11 +02:00
2022-09-30 11:59:11 +02:00
2022-09-30 11:59:11 +02:00