mirror of https://github.com/docker/cli.git
Allow extension fields in the v3.4 version of the compose format.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
8da1daeefa
commit
2a1857e899
File diff suppressed because one or more lines are too long
|
@ -64,6 +64,7 @@
|
|||
}
|
||||
},
|
||||
|
||||
"patternProperties": {"^x-": {}},
|
||||
"additionalProperties": false,
|
||||
|
||||
"definitions": {
|
||||
|
|
|
@ -36,6 +36,16 @@ func TestValidateUndefinedTopLevelOption(t *testing.T) {
|
|||
assert.Contains(t, err.Error(), "Additional property helicopters is not allowed")
|
||||
}
|
||||
|
||||
func TestValidateAllowsXTopLevelFields(t *testing.T) {
|
||||
config := dict{
|
||||
"version": "3.4",
|
||||
"x-extra-stuff": dict{},
|
||||
}
|
||||
|
||||
err := Validate(config, "3.4")
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestValidateInvalidVersion(t *testing.T) {
|
||||
config := dict{
|
||||
"version": "2.1",
|
||||
|
|
Loading…
Reference in New Issue