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

Function TestPostStartAndPreStopHook

pkg/e2e/hooks_test.go:110–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

108}
109
110func TestPostStartAndPreStopHook(t *testing.T) {
111 c := NewParallelCLI(t)
112 const projectName = "hooks-post-start-and-pre-stop"
113
114 t.Cleanup(func() {
115 res := c.RunDockerComposeCmd(t, "-f", "fixtures/hooks/compose.yaml", "--project-name", projectName, "down", "-v", "--remove-orphans", "-t", "0")
116 res.Assert(t, icmd.Expected{ExitCode: 0})
117 })
118
119 res := c.RunDockerComposeCmd(t, "-f", "fixtures/hooks/compose.yaml", "--project-name", projectName, "up", "-d")
120 res.Assert(t, icmd.Expected{ExitCode: 0})
121}
122
123func TestPreStartHookSuccess(t *testing.T) {
124 c := NewParallelCLI(t)

Callers

nothing calls this directly

Calls 2

NewParallelCLIFunction · 0.85
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected