@@ -246,3 +246,19 @@ func TestStartStopMultipleServices(t *testing.T) {
246
246
fmt .Sprintf ("Missing start message for %s\n %s" , svc , res .Combined ()))
247
247
}
248
248
}
249
+
250
+ func TestStartStopMultipleFiles (t * testing.T ) {
251
+ cli := NewParallelCLI (t , WithEnv ("COMPOSE_PROJECT_NAME=e2e-start-stop-svc-multiple-files" ))
252
+ t .Cleanup (func () {
253
+ cli .RunDockerComposeCmd (t , "-p" , "e2e-start-stop-svc-multiple-files" , "down" , "--remove-orphans" )
254
+ })
255
+
256
+ cli .RunDockerComposeCmd (t , "-f" , "./fixtures/start-stop/compose.yaml" , "up" , "-d" )
257
+ cli .RunDockerComposeCmd (t , "-f" , "./fixtures/start-stop/other.yaml" , "up" , "-d" )
258
+
259
+ res := cli .RunDockerComposeCmd (t , "-f" , "./fixtures/start-stop/compose.yaml" , "stop" )
260
+ assert .Assert (t , strings .Contains (res .Combined (), "Container e2e-start-stop-svc-multiple-files-simple-1 Stopped" ), res .Combined ())
261
+ assert .Assert (t , strings .Contains (res .Combined (), "Container e2e-start-stop-svc-multiple-files-another-1 Stopped" ), res .Combined ())
262
+ assert .Assert (t , ! strings .Contains (res .Combined (), "Container e2e-start-stop-svc-multiple-files-a-different-one-1 Stopped" ), res .Combined ())
263
+ assert .Assert (t , ! strings .Contains (res .Combined (), "Container e2e-start-stop-svc-multiple-files-and-another-one-1 Stopped" ), res .Combined ())
264
+ }
0 commit comments