MCPcopy Create free account
hub / github.com/docker/compose / TestPreStartHookBuildInheritance

Function TestPreStartHookBuildInheritance

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

Source from the content-addressed store, hash-verified

156}
157
158func TestPreStartHookBuildInheritance(t *testing.T) {
159 c := NewParallelCLI(t)
160 const projectName = "hooks-pre-start-build"
161
162 t.Cleanup(func() {
163 c.RunDockerComposeCmd(t, "-f", "fixtures/pre_start/compose-build.yaml", "--project-name", projectName, "down", "-v", "--remove-orphans", "--rmi", "local", "-t", "0")
164 })
165
166 res := c.RunDockerComposeCmd(t, "-f", "fixtures/pre_start/compose-build.yaml", "--project-name", projectName, "up", "-d", "--wait")
167 res.Assert(t, icmd.Expected{ExitCode: 0})
168
169 logs := c.RunDockerComposeCmd(t, "-f", "fixtures/pre_start/compose-build.yaml", "--project-name", projectName, "logs", "sample")
170 assert.Assert(t, strings.Contains(logs.Combined(), "built-image-marker"), logs.Combined())
171}
172
173func TestPreStartHookIdempotentReUp(t *testing.T) {
174 c := NewParallelCLI(t)

Callers

nothing calls this directly

Calls 2

NewParallelCLIFunction · 0.85
RunDockerComposeCmdMethod · 0.80

Tested by

no test coverage detected