(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func TestCascadeFail(t *testing.T) { |
| 43 | c := NewCLI(t) |
| 44 | const projectName = "compose-e2e-cascade-fail" |
| 45 | t.Cleanup(func() { |
| 46 | c.RunDockerComposeCmd(t, "--project-name", projectName, "down") |
| 47 | }) |
| 48 | |
| 49 | res := c.RunDockerComposeCmdNoCheck(t, "-f", "./fixtures/cascade/compose.yaml", "--project-name", projectName, |
| 50 | "up", "--abort-on-container-failure") |
| 51 | assert.Assert(t, strings.Contains(res.Combined(), "exit-1 exited with code 0"), res.Combined()) |
| 52 | assert.Assert(t, strings.Contains(res.Combined(), "fail-1 exited with code 111"), res.Combined()) |
| 53 | // failing exit code should be propagated |
| 54 | assert.Equal(t, res.ExitCode, 111) |
| 55 | } |
nothing calls this directly
no test coverage detected