(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func TestPostStartHookInError(t *testing.T) { |
| 39 | c := NewParallelCLI(t) |
| 40 | const projectName = "hooks-post-start-failure" |
| 41 | |
| 42 | t.Cleanup(func() { |
| 43 | c.RunDockerComposeCmd(t, "--project-name", projectName, "down", "-v", "--remove-orphans", "-t", "0") |
| 44 | }) |
| 45 | |
| 46 | res := c.RunDockerComposeCmdNoCheck(t, "-f", "fixtures/hooks/poststart/compose-error.yaml", "--project-name", projectName, "up", "-d") |
| 47 | res.Assert(t, icmd.Expected{ExitCode: 1}) |
| 48 | assert.Assert(t, strings.Contains(res.Combined(), "test hook exited with status 127"), res.Combined()) |
| 49 | } |
| 50 | |
| 51 | func TestPostStartHookSuccess(t *testing.T) { |
| 52 | c := NewParallelCLI(t) |
nothing calls this directly
no test coverage detected