(t *testing.T)
| 218 | } |
| 219 | |
| 220 | func TestStartStopMultipleServices(t *testing.T) { |
| 221 | cli := NewParallelCLI(t, WithEnv( |
| 222 | "COMPOSE_PROJECT_NAME=e2e-start-stop-svc-multiple", |
| 223 | "COMPOSE_FILE=./fixtures/start-stop/compose.yaml")) |
| 224 | t.Cleanup(func() { |
| 225 | cli.RunDockerComposeCmd(t, "down", "--remove-orphans", "-v", "-t", "0") |
| 226 | }) |
| 227 | |
| 228 | cli.RunDockerComposeCmd(t, "up", "-d", "--wait") |
| 229 | |
| 230 | res := cli.RunDockerComposeCmd(t, "stop", "simple", "another") |
| 231 | services := []string{"simple", "another"} |
| 232 | for _, svc := range services { |
| 233 | stopMsg := fmt.Sprintf("Container e2e-start-stop-svc-multiple-%s-1 Stopped", svc) |
| 234 | assert.Assert(t, strings.Contains(res.Stderr(), stopMsg), |
| 235 | fmt.Sprintf("Missing stop message for %s\n%s", svc, res.Combined())) |
| 236 | } |
| 237 | |
| 238 | res = cli.RunDockerComposeCmd(t, "start", "simple", "another") |
| 239 | for _, svc := range services { |
| 240 | startMsg := fmt.Sprintf("Container e2e-start-stop-svc-multiple-%s-1 Started", svc) |
| 241 | assert.Assert(t, strings.Contains(res.Stderr(), startMsg), |
| 242 | fmt.Sprintf("Missing start message for %s\n%s", svc, res.Combined())) |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | func TestStartSingleServiceAndDependency(t *testing.T) { |
| 247 | cli := NewParallelCLI(t, WithEnv( |
nothing calls this directly
no test coverage detected