Disable ImportTestcontainersTests when Docker is unavailable

See gh-35245
pull/35286/head
Andy Wilkinson 2 years ago
parent ae86c2f30e
commit 10fd7517a8

@ -26,6 +26,7 @@ import org.testcontainers.containers.PostgreSQLContainer;
import org.springframework.boot.testcontainers.beans.TestcontainerBeanDefinition; import org.springframework.boot.testcontainers.beans.TestcontainerBeanDefinition;
import org.springframework.boot.testcontainers.context.ImportTestcontainers; import org.springframework.boot.testcontainers.context.ImportTestcontainers;
import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnavailable;
import org.springframework.boot.testsupport.testcontainers.DockerImageNames; import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.test.context.DynamicPropertyRegistry; import org.springframework.test.context.DynamicPropertyRegistry;
@ -39,6 +40,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
@DisabledIfDockerUnavailable
class ImportTestcontainersTests { class ImportTestcontainersTests {
private AnnotationConfigApplicationContext applicationContext; private AnnotationConfigApplicationContext applicationContext;

Loading…
Cancel
Save