Skip to content

Commit baa35e0

Browse files
lewiscowleschipukndeloof
authored andcommitted
Additional failing test case
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 436b367 commit baa35e0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

loader/loader_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,25 @@ services:
290290
assert.Check(t, service.Command[0] == "echo")
291291
}
292292

293+
func TestLoadExtendsOverrideCommand(t *testing.T) {
294+
actual, err := loadYAML(`
295+
services:
296+
foo:
297+
image: busybox
298+
extends:
299+
service: bar
300+
command: "/bin/ash -c \"rm -rf /tmp/might-not-exist\""
301+
bar:
302+
image: alpine
303+
command: "/bin/ash -c \"echo Oh no...\""`)
304+
assert.NilError(t, err)
305+
assert.Check(t, is.Len(actual.Services, 2))
306+
service, err := actual.GetService("foo")
307+
assert.NilError(t, err)
308+
assert.Check(t, service.Image == "busybox")
309+
assert.DeepEqual(t, service.Command, types.ShellCommand{"/bin/ash", "-c", "rm -rf /tmp/might-not-exist"})
310+
}
311+
293312
func TestLoadCredentialSpec(t *testing.T) {
294313
actual, err := loadYAML(`
295314
services:

0 commit comments

Comments
 (0)