@@ -6,7 +6,7 @@ Background:
6
6
services:
7
7
should_fail:
8
8
image: alpine
9
- command: ls /does_not_exist
9
+ command: ['sh', '-c', 'exit 123']
10
10
sleep: # will be killed
11
11
image: alpine
12
12
command: ping localhost
@@ -15,15 +15,22 @@ Background:
15
15
16
16
Scenario : Cascade stop
17
17
When I run "compose up --abort-on-container-exit"
18
- Then the output contains "should_fail-1 exited with code 1 "
18
+ Then the output contains "should_fail-1 exited with code 123 "
19
19
And the output contains "Aborting on container exit..."
20
- And the exit code is 1
20
+ And the exit code is 123
21
21
22
22
Scenario : Exit code from
23
- When I run "compose up --exit-code-from sleep "
24
- Then the output contains "should_fail-1 exited with code 1 "
23
+ When I run "compose up --exit-code-from should_fail "
24
+ Then the output contains "should_fail-1 exited with code 123 "
25
25
And the output contains "Aborting on container exit..."
26
- And the exit code is 143
26
+ And the exit code is 123
27
+
28
+ # TODO: this is currently not working propagating the exit code properly
29
+ #Scenario: Exit code from (cascade stop)
30
+ # When I run "compose up --exit-code-from sleep"
31
+ # Then the output contains "should_fail-1 exited with code 123"
32
+ # And the output contains "Aborting on container exit..."
33
+ # And the exit code is 143
27
34
28
35
Scenario : Exit code from unknown service
29
36
When I run "compose up --exit-code-from unknown"
0 commit comments