@@ -36,6 +36,8 @@ func TestCascadeStop(t *testing.T) {
36
36
res := c .RunDockerComposeCmd (t , "-f" , "./fixtures/cascade/compose.yaml" , "--project-name" , projectName ,
37
37
"up" , "--abort-on-container-exit" )
38
38
assert .Assert (t , strings .Contains (res .Combined (), "exit-1 exited with code 0" ), res .Combined ())
39
+ // no --exit-code-from, so this is not an error
40
+ assert .Equal (t , res .ExitCode , 0 )
39
41
}
40
42
41
43
func TestCascadeFail (t * testing.T ) {
@@ -48,6 +50,7 @@ func TestCascadeFail(t *testing.T) {
48
50
res := c .RunDockerComposeCmdNoCheck (t , "-f" , "./fixtures/cascade/compose.yaml" , "--project-name" , projectName ,
49
51
"up" , "--abort-on-container-failure" )
50
52
assert .Assert (t , strings .Contains (res .Combined (), "exit-1 exited with code 0" ), res .Combined ())
51
- assert .Assert (t , strings .Contains (res .Combined (), "fail-1 exited with code 1" ), res .Combined ())
52
- assert .Equal (t , res .ExitCode , 1 )
53
+ assert .Assert (t , strings .Contains (res .Combined (), "fail-1 exited with code 111" ), res .Combined ())
54
+ // failing exit code should be propagated
55
+ assert .Equal (t , res .ExitCode , 111 )
53
56
}
0 commit comments