Skip to content

Commit c2f21e9

Browse files
committed
Don't execute @DockerComposeTests if docker is not running
Closes gh-41171
1 parent 2a4582b commit c2f21e9

File tree

1 file changed

+4
-0
lines changed
  • spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/test

1 file changed

+4
-0
lines changed

spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/test/DockerComposeTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727

2828
import org.springframework.boot.SpringApplication;
2929
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
30+
import org.springframework.boot.testsupport.container.DisabledIfDockerUnavailable;
3031
import org.springframework.boot.testsupport.container.TestImage;
32+
import org.springframework.boot.testsupport.process.DisabledIfProcessUnavailable;
3133

3234
/**
3335
* A {@link Test test} that exercises Spring Boot's Docker Compose support.
@@ -48,6 +50,8 @@
4850
@Retention(RetentionPolicy.RUNTIME)
4951
@Documented
5052
@ExtendWith(DockerComposeTestExtension.class)
53+
@DisabledIfDockerUnavailable
54+
@DisabledIfProcessUnavailable({ "docker", "compose" })
5155
public @interface DockerComposeTest {
5256

5357
/**

0 commit comments

Comments
 (0)