(t *testing.T)
| 244 | } |
| 245 | |
| 246 | func TestStartSingleServiceAndDependency(t *testing.T) { |
| 247 | cli := NewParallelCLI(t, WithEnv( |
| 248 | "COMPOSE_PROJECT_NAME=e2e-start-single-deps", |
| 249 | "COMPOSE_FILE=./fixtures/start-stop/start-stop-deps.yaml")) |
| 250 | t.Cleanup(func() { |
| 251 | cli.RunDockerComposeCmd(t, "down", "--remove-orphans", "-v", "-t", "0") |
| 252 | }) |
| 253 | |
| 254 | cli.RunDockerComposeCmd(t, "create", "desired") |
| 255 | |
| 256 | res := cli.RunDockerComposeCmd(t, "start", "desired") |
| 257 | desiredServices := []string{"desired", "dep_1", "dep_2"} |
| 258 | for _, s := range desiredServices { |
| 259 | startMsg := fmt.Sprintf("Container e2e-start-single-deps-%s-1 Started", s) |
| 260 | assert.Assert(t, strings.Contains(res.Combined(), startMsg), |
| 261 | fmt.Sprintf("Missing start message for service: %s\n%s", s, res.Combined())) |
| 262 | } |
| 263 | undesiredServices := []string{"another", "another_2"} |
| 264 | for _, s := range undesiredServices { |
| 265 | assert.Assert(t, !strings.Contains(res.Combined(), s), |
| 266 | fmt.Sprintf("Shouldn't have message for service: %s\n%s", s, res.Combined())) |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | func TestStartStopMultipleFiles(t *testing.T) { |
| 271 | cli := NewParallelCLI(t, WithEnv("COMPOSE_PROJECT_NAME=e2e-start-stop-svc-multiple-files")) |
nothing calls this directly
no test coverage detected