Skip to content

Commit 1277e8f

Browse files
authored
Merge pull request #4214 from laurazard/compose-schema-x-props
Swarm: Add schema 3.11, and Allow additional properties in `build`
2 parents d70b539 + 271b966 commit 1277e8f

4 files changed

Lines changed: 687 additions & 3 deletions

File tree

cli/compose/loader/loader_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func strPtr(val string) *string {
179179
}
180180

181181
var sampleConfig = types.Config{
182-
Version: "3.10",
182+
Version: "3.11",
183183
Services: []types.ServiceConfig{
184184
{
185185
Name: "foo",
@@ -488,6 +488,17 @@ services:
488488
assert.Check(t, is.ErrorContains(err, "services.foo.image must be a string"))
489489
}
490490

491+
func TestIgnoreBuildProperties(t *testing.T) {
492+
_, err := loadYAML(`
493+
services:
494+
foo:
495+
image: busybox
496+
build:
497+
unsupported_prop: foo
498+
`)
499+
assert.NilError(t, err)
500+
}
501+
491502
func TestLoadWithEnvironment(t *testing.T) {
492503
config, err := loadYAMLWithEnv(`
493504
version: "3"

0 commit comments

Comments
 (0)