MCPcopy
hub / github.com/docker/compose / TestPreStopHookSuccessWithPreviousStop

Function TestPreStopHookSuccessWithPreviousStop

pkg/e2e/hooks_test.go:94–108  ·  pkg/e2e/hooks_test.go::TestPreStopHookSuccessWithPreviousStop
(t *testing.T)

Source from the content-addressed store, hash-verified

92}
93
94func 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
110func TestPostStartAndPreStopHook(t *testing.T) {
111 c := NewParallelCLI(t)

Callers

nothing calls this directly

Calls 2

NewParallelCLIFunction · 0.85
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected