2222import java .nio .file .Files ;
2323import java .nio .file .Path ;
2424import java .time .Duration ;
25+ import java .util .Collections ;
2526import java .util .List ;
2627import java .util .Set ;
2728
2829import org .assertj .core .api .Assertions ;
2930import org .junit .jupiter .api .Test ;
3031import org .junit .jupiter .api .io .TempDir ;
3132
33+ import org .springframework .boot .docker .compose .core .DockerCli .DockerComposeOptions ;
3234import org .springframework .boot .logging .LogLevel ;
3335import org .springframework .boot .testsupport .container .DisabledIfDockerUnavailable ;
3436import org .springframework .boot .testsupport .container .TestImage ;
@@ -51,12 +53,15 @@ void shouldWorkWithProfiles(@TempDir Path tempDir) throws IOException {
5153 // Profile 1 contains redis1 and redis3
5254 // Profile 2 contains redis2 and redis3
5355 File composeFile = createComposeFile (tempDir , "profiles.yaml" ).toFile ();
54- DefaultDockerCompose dockerComposeWithProfile1 = new DefaultDockerCompose (
55- new DockerCli (tempDir .toFile (), DockerComposeFile .of (composeFile ), Set .of ("1" )), null );
56- DefaultDockerCompose dockerComposeWithProfile2 = new DefaultDockerCompose (
57- new DockerCli (tempDir .toFile (), DockerComposeFile .of (composeFile ), Set .of ("2" )), null );
58- DefaultDockerCompose dockerComposeWithAllProfiles = new DefaultDockerCompose (
59- new DockerCli (tempDir .toFile (), DockerComposeFile .of (composeFile ), Set .of ("1" , "2" )), null );
56+ DefaultDockerCompose dockerComposeWithProfile1 = new DefaultDockerCompose (new DockerCli (tempDir .toFile (),
57+ new DockerComposeOptions (DockerComposeFile .of (composeFile ), Set .of ("1" ), Collections .emptyList ())),
58+ null );
59+ DefaultDockerCompose dockerComposeWithProfile2 = new DefaultDockerCompose (new DockerCli (tempDir .toFile (),
60+ new DockerComposeOptions (DockerComposeFile .of (composeFile ), Set .of ("2" ), Collections .emptyList ())),
61+ null );
62+ DefaultDockerCompose dockerComposeWithAllProfiles = new DefaultDockerCompose (new DockerCli (tempDir .toFile (),
63+ new DockerComposeOptions (DockerComposeFile .of (composeFile ), Set .of ("1" , "2" ), Collections .emptyList ())),
64+ null );
6065 dockerComposeWithAllProfiles .up (LogLevel .DEBUG );
6166 try {
6267 List <RunningService > runningServicesProfile1 = dockerComposeWithProfile1 .getRunningServices ();
0 commit comments