Fix disabled conditions on AbstractDockerComposeIntegrationTests
This commit is contained in:
parent
cbc03783d0
commit
b64adbc34b
|
|
@ -25,7 +25,6 @@ import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.SpringApplicationShutdownHandlers;
|
import org.springframework.boot.SpringApplicationShutdownHandlers;
|
||||||
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
|
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
|
||||||
import org.springframework.boot.testsupport.process.DisabledIfProcessUnavailable;
|
import org.springframework.boot.testsupport.process.DisabledIfProcessUnavailable;
|
||||||
import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnavailable;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
|
|
@ -37,7 +36,7 @@ import org.springframework.util.function.ThrowingSupplier;
|
||||||
* @author Moritz Halbritter
|
* @author Moritz Halbritter
|
||||||
* @author Andy Wilkinson
|
* @author Andy Wilkinson
|
||||||
*/
|
*/
|
||||||
@DisabledIfDockerUnavailable
|
@DisabledIfProcessUnavailable({ "docker", "version" })
|
||||||
@DisabledIfProcessUnavailable({ "docker", "compose" })
|
@DisabledIfProcessUnavailable({ "docker", "compose" })
|
||||||
public abstract class AbstractDockerComposeIntegrationTests {
|
public abstract class AbstractDockerComposeIntegrationTests {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import org.junit.jupiter.api.extension.ExtensionContext;
|
||||||
|
|
||||||
import org.springframework.core.annotation.MergedAnnotation;
|
import org.springframework.core.annotation.MergedAnnotation;
|
||||||
import org.springframework.core.annotation.MergedAnnotations;
|
import org.springframework.core.annotation.MergedAnnotations;
|
||||||
|
import org.springframework.core.annotation.MergedAnnotations.SearchStrategy;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
|
@ -57,7 +58,7 @@ class DisabledIfProcessUnavailableCondition implements ExecutionCondition {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Stream<String[]> getAnnotationValue(AnnotatedElement testClass) {
|
private Stream<String[]> getAnnotationValue(AnnotatedElement testClass) {
|
||||||
return MergedAnnotations.from(testClass)
|
return MergedAnnotations.from(testClass, SearchStrategy.TYPE_HIERARCHY)
|
||||||
.stream(DisabledIfProcessUnavailable.class)
|
.stream(DisabledIfProcessUnavailable.class)
|
||||||
.map((annotation) -> annotation.getStringArray(MergedAnnotation.VALUE));
|
.map((annotation) -> annotation.getStringArray(MergedAnnotation.VALUE));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue