@@ -36,6 +36,8 @@ func TestCascadeStop(t *testing.T) {
3636 res := c .RunDockerComposeCmd (t , "-f" , "./fixtures/cascade/compose.yaml" , "--project-name" , projectName ,
3737 "up" , "--abort-on-container-exit" )
3838 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 )
3941}
4042
4143func TestCascadeFail (t * testing.T ) {
@@ -48,6 +50,7 @@ func TestCascadeFail(t *testing.T) {
4850 res := c .RunDockerComposeCmdNoCheck (t , "-f" , "./fixtures/cascade/compose.yaml" , "--project-name" , projectName ,
4951 "up" , "--abort-on-container-failure" )
5052 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 )
5356}
0 commit comments