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

Function TestPreStopHookSuccess

pkg/e2e/hooks_test.go:63–76  ·  pkg/e2e/hooks_test.go::TestPreStopHookSuccess
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestPreStopHookSuccess(t *testing.T) {
64 c := NewParallelCLI(t)
65 const projectName = "hooks-pre-stop-success"
66
67 t.Cleanup(func() {
68 c.RunDockerComposeCmd(t, "-f", "fixtures/hooks/prestop/compose-success.yaml", "--project-name", projectName, "down", "-v", "--remove-orphans", "-t", "0")
69 })
70
71 res := c.RunDockerComposeCmd(t, "-f", "fixtures/hooks/prestop/compose-success.yaml", "--project-name", projectName, "up", "-d")
72 res.Assert(t, icmd.Expected{ExitCode: 0})
73
74 res = c.RunDockerComposeCmd(t, "-f", "fixtures/hooks/prestop/compose-success.yaml", "--project-name", projectName, "down", "-v", "--remove-orphans", "-t", "0")
75 res.Assert(t, icmd.Expected{ExitCode: 0})
76}
77
78func TestPreStopHookInError(t *testing.T) {
79 c := NewParallelCLI(t)

Callers

nothing calls this directly

Calls 2

NewParallelCLIFunction · 0.85
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected