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

Function TestRemoveOrphans

pkg/e2e/orphans_test.go:26–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestRemoveOrphans(t *testing.T) {
27 c := NewCLI(t)
28
29 const projectName = "compose-e2e-orphans"
30 defer c.cleanupWithDown(t, projectName)
31
32 c.RunDockerComposeCmd(t, "-f", "./fixtures/orphans/compose.yaml", "-p", projectName, "run", "orphan")
33 res := c.RunDockerComposeCmd(t, "-p", projectName, "ps", "--all")
34 assert.Check(t, strings.Contains(res.Combined(), "compose-e2e-orphans-orphan-run-"))
35
36 c.RunDockerComposeCmd(t, "-f", "./fixtures/orphans/compose.yaml", "-p", projectName, "up", "-d")
37
38 res = c.RunDockerComposeCmd(t, "-p", projectName, "ps", "--all")
39 assert.Check(t, !strings.Contains(res.Combined(), "compose-e2e-orphans-orphan-run-"))
40}

Callers

nothing calls this directly

Calls 3

cleanupWithDownMethod · 0.95
RunDockerComposeCmdMethod · 0.95
NewCLIFunction · 0.85

Tested by

no test coverage detected