(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func TestPreStopHookSuccessWithPreviousStop(t *testing.T) { |
| 95 | c := NewParallelCLI(t) |
| 96 | const projectName = "hooks-pre-stop-success-with-previous-stop" |
| 97 | |
| 98 | t.Cleanup(func() { |
| 99 | res := c.RunDockerComposeCmd(t, "-f", "fixtures/hooks/compose.yaml", "--project-name", projectName, "down", "-v", "--remove-orphans", "-t", "0") |
| 100 | res.Assert(t, icmd.Expected{ExitCode: 0}) |
| 101 | }) |
| 102 | |
| 103 | res := c.RunDockerComposeCmd(t, "-f", "fixtures/hooks/compose.yaml", "--project-name", projectName, "up", "-d") |
| 104 | res.Assert(t, icmd.Expected{ExitCode: 0}) |
| 105 | |
| 106 | res = c.RunDockerComposeCmd(t, "-f", "fixtures/hooks/compose.yaml", "--project-name", projectName, "stop", "sample") |
| 107 | res.Assert(t, icmd.Expected{ExitCode: 0}) |
| 108 | } |
| 109 | |
| 110 | func TestPostStartAndPreStopHook(t *testing.T) { |
| 111 | c := NewParallelCLI(t) |
nothing calls this directly
no test coverage detected