Swarm: allow additional properties in build
Since Swarm does not use the `build` section, there's no reason to validate properties here. This makes it so we don't have to keep updating the schema in the CLI to support properties added in the Compose Spec for build, and does not imply any new feature support since Swarm does not consider this section. Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
@ -179,7 +179,7 @@ func strPtr(val string) *string {
|
||||
}
|
||||
|
||||
var sampleConfig = types.Config{
|
||||
Version: "3.10",
|
||||
Version: "3.11",
|
||||
Services: []types.ServiceConfig{
|
||||
{
|
||||
Name: "foo",
|
||||
@ -488,6 +488,17 @@ services:
|
||||
assert.Check(t, is.ErrorContains(err, "services.foo.image must be a string"))
|
||||
}
|
||||
|
||||
func TestIgnoreBuildProperties(t *testing.T) {
|
||||
_, err := loadYAML(`
|
||||
services:
|
||||
foo:
|
||||
image: busybox
|
||||
build:
|
||||
unsupported_prop: foo
|
||||
`)
|
||||
assert.NilError(t, err)
|
||||
}
|
||||
|
||||
func TestLoadWithEnvironment(t *testing.T) {
|
||||
config, err := loadYAMLWithEnv(`
|
||||
version: "3"
|
||||
|
||||
Reference in New Issue
Block a user