(t *testing.T)
| 294 | } |
| 295 | |
| 296 | func TestRemoveOrphaned(t *testing.T) { |
| 297 | const projectName = "compose-e2e-remove-orphaned" |
| 298 | c := NewParallelCLI(t) |
| 299 | |
| 300 | cleanup := func() { |
| 301 | c.RunDockerComposeCmd(t, "-p", projectName, "down", "--remove-orphans", "--timeout=0") |
| 302 | } |
| 303 | cleanup() |
| 304 | t.Cleanup(cleanup) |
| 305 | |
| 306 | // run stack |
| 307 | c.RunDockerComposeCmd(t, "-f", "./fixtures/sentences/compose.yaml", "-p", projectName, "up", "-d") |
| 308 | |
| 309 | // down "web" service with orphaned removed |
| 310 | c.RunDockerComposeCmd(t, "-f", "./fixtures/sentences/compose.yaml", "-p", projectName, "down", "--remove-orphans", "web") |
| 311 | |
| 312 | // check "words" service has not been considered orphaned |
| 313 | res := c.RunDockerComposeCmd(t, "-f", "./fixtures/sentences/compose.yaml", "-p", projectName, "ps", "--format", "{{.Name}}") |
| 314 | res.Assert(t, icmd.Expected{Out: fmt.Sprintf("%s-words-1", projectName)}) |
| 315 | } |
| 316 | |
| 317 | func TestComposeFileSetByDotEnv(t *testing.T) { |
| 318 | c := NewCLI(t) |
nothing calls this directly
no test coverage detected