diff --git a/examples/amq-amqp/pom.xml b/examples/amq-amqp/pom.xml index 4918056fe..007f9bbfd 100644 --- a/examples/amq-amqp/pom.xml +++ b/examples/amq-amqp/pom.xml @@ -34,31 +34,4 @@ test - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/examples/amq-tcp/pom.xml b/examples/amq-tcp/pom.xml index 7e2040e55..beffa6cf1 100644 --- a/examples/amq-tcp/pom.xml +++ b/examples/amq-tcp/pom.xml @@ -35,31 +35,4 @@ test - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/examples/blocking-reactive-model/pom.xml b/examples/blocking-reactive-model/pom.xml index 4fc514ca1..b82e721a7 100644 --- a/examples/blocking-reactive-model/pom.xml +++ b/examples/blocking-reactive-model/pom.xml @@ -60,33 +60,5 @@ - - - skip-tests-on-windows-in-native - - - windows - - - native - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - diff --git a/examples/consul/pom.xml b/examples/consul/pom.xml index add2321cf..b9e1f3df4 100644 --- a/examples/consul/pom.xml +++ b/examples/consul/pom.xml @@ -66,30 +66,5 @@ - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - diff --git a/examples/database-mysql/pom.xml b/examples/database-mysql/pom.xml index 26c6bbf2b..26904d7db 100644 --- a/examples/database-mysql/pom.xml +++ b/examples/database-mysql/pom.xml @@ -63,31 +63,4 @@ - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/examples/database-oracle/pom.xml b/examples/database-oracle/pom.xml index adf6e15f0..acc1a4c75 100644 --- a/examples/database-oracle/pom.xml +++ b/examples/database-oracle/pom.xml @@ -59,31 +59,4 @@ - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/examples/database-postgresql/pom.xml b/examples/database-postgresql/pom.xml index 7069a7ada..fa94fd4a6 100644 --- a/examples/database-postgresql/pom.xml +++ b/examples/database-postgresql/pom.xml @@ -63,31 +63,4 @@ - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/examples/infinispan/pom.xml b/examples/infinispan/pom.xml index c504fe85f..505f4e463 100644 --- a/examples/infinispan/pom.xml +++ b/examples/infinispan/pom.xml @@ -65,30 +65,5 @@ - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - diff --git a/examples/jaeger/pom.xml b/examples/jaeger/pom.xml index 2d2f4221d..892976758 100644 --- a/examples/jaeger/pom.xml +++ b/examples/jaeger/pom.xml @@ -45,31 +45,4 @@ - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/examples/kafka-registry/pom.xml b/examples/kafka-registry/pom.xml index 0e15dac9a..5ed1df470 100644 --- a/examples/kafka-registry/pom.xml +++ b/examples/kafka-registry/pom.xml @@ -90,31 +90,4 @@ - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/examples/kafka-streams/pom.xml b/examples/kafka-streams/pom.xml index 7bb9092e6..8c89e6009 100644 --- a/examples/kafka-streams/pom.xml +++ b/examples/kafka-streams/pom.xml @@ -64,30 +64,5 @@ - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - diff --git a/examples/kafka/pom.xml b/examples/kafka/pom.xml index abffafe85..acab44545 100644 --- a/examples/kafka/pom.xml +++ b/examples/kafka/pom.xml @@ -68,31 +68,4 @@ - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/examples/keycloak/pom.xml b/examples/keycloak/pom.xml index 57cd8ae76..33f21ef17 100644 --- a/examples/keycloak/pom.xml +++ b/examples/keycloak/pom.xml @@ -65,30 +65,5 @@ - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - diff --git a/extensions/metrics/pom.xml b/extensions/metrics/pom.xml index e0d1d33a6..8a2e3a054 100644 --- a/extensions/metrics/pom.xml +++ b/extensions/metrics/pom.xml @@ -30,31 +30,4 @@ test - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/extensions/tracing/pom.xml b/extensions/tracing/pom.xml index 82a2aad6a..cbba50020 100644 --- a/extensions/tracing/pom.xml +++ b/extensions/tracing/pom.xml @@ -35,31 +35,4 @@ test - - - - skip-tests-on-windows - - - windows - - - - - - maven-surefire-plugin - - true - - - - maven-failsafe-plugin - - true - - - - - - diff --git a/quarkus-test-cli/src/main/java/io/quarkus/test/execution/condition/CliQuarkusScenarioContainerExecutionCondition.java b/quarkus-test-cli/src/main/java/io/quarkus/test/execution/condition/CliQuarkusScenarioContainerExecutionCondition.java new file mode 100644 index 000000000..762be77c2 --- /dev/null +++ b/quarkus-test-cli/src/main/java/io/quarkus/test/execution/condition/CliQuarkusScenarioContainerExecutionCondition.java @@ -0,0 +1,22 @@ +package io.quarkus.test.execution.condition; + +import io.quarkus.test.scenarios.execution.condition.AbstractQuarkusScenarioContainerExecutionCondition; + +/** + * Disables Quarkus CLI tests when Linux containers are not available as for now, we are not able to recognize + * whether unit test invokes DEV mode or not. + */ +public class CliQuarkusScenarioContainerExecutionCondition + extends AbstractQuarkusScenarioContainerExecutionCondition { + + private static final String QUARKUS_CLI_TEST_CLASS_PREFIX = "QuarkusCli"; + + @Override + protected boolean areContainersRequired(Class testClass) { + // TODO: we can run cli tests that are not DEV mode tests on Windows, but first we need to revise + // io.quarkus.test.bootstrap.QuarkusCliClient.createApplication that launches app in a DEV mode + // and then find a mechanism that detects whether app is run in a DEV mode (like Assumption or tag) + return testClass.getSimpleName().startsWith(QUARKUS_CLI_TEST_CLASS_PREFIX); + } + +} diff --git a/quarkus-test-cli/src/main/resources/META-INF/services/io.quarkus.test.scenarios.execution.condition.QuarkusScenarioExecutionCondition b/quarkus-test-cli/src/main/resources/META-INF/services/io.quarkus.test.scenarios.execution.condition.QuarkusScenarioExecutionCondition new file mode 100644 index 000000000..c3e6870b5 --- /dev/null +++ b/quarkus-test-cli/src/main/resources/META-INF/services/io.quarkus.test.scenarios.execution.condition.QuarkusScenarioExecutionCondition @@ -0,0 +1 @@ +io.quarkus.test.execution.condition.CliQuarkusScenarioContainerExecutionCondition \ No newline at end of file diff --git a/quarkus-test-cli/src/test/java/io/quarkus/test/QuarkusCliClientIT.java b/quarkus-test-cli/src/test/java/io/quarkus/test/QuarkusCliClientIT.java index b016c5d77..c9bdd0f2c 100644 --- a/quarkus-test-cli/src/test/java/io/quarkus/test/QuarkusCliClientIT.java +++ b/quarkus-test-cli/src/test/java/io/quarkus/test/QuarkusCliClientIT.java @@ -16,8 +16,6 @@ import org.apache.http.HttpStatus; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnOs; -import org.junit.jupiter.api.condition.OS; import io.quarkus.test.bootstrap.QuarkusCliClient; import io.quarkus.test.bootstrap.QuarkusCliRestService; @@ -67,7 +65,6 @@ public void shouldCreateApplicationOnJvm() { @Test @EnabledOnNative - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "Windows does not support Linux containers yet") public void shouldBuildApplicationOnNativeUsingDocker() { // Create application QuarkusCliRestService app = cliClient.createApplication("app", defaults().withStream(STREAM_VERSION)); diff --git a/quarkus-test-containers/src/main/java/io/quarkus/test/services/containers/ContainerAnnotationBinding.java b/quarkus-test-containers/src/main/java/io/quarkus/test/services/containers/ContainerAnnotationBinding.java index ae17f7941..7520d9b7b 100644 --- a/quarkus-test-containers/src/main/java/io/quarkus/test/services/containers/ContainerAnnotationBinding.java +++ b/quarkus-test-containers/src/main/java/io/quarkus/test/services/containers/ContainerAnnotationBinding.java @@ -22,4 +22,9 @@ public ManagedResourceBuilder createBuilder(Field field) throws Exception { return builder; } + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return true; + } + } diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/bootstrap/AnnotationBinding.java b/quarkus-test-core/src/main/java/io/quarkus/test/bootstrap/AnnotationBinding.java index b2b191478..c69dc80a5 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/bootstrap/AnnotationBinding.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/bootstrap/AnnotationBinding.java @@ -6,4 +6,11 @@ public interface AnnotationBinding { boolean isFor(Field field); ManagedResourceBuilder createBuilder(Field field) throws Exception; + + /** + * Whether associated managed resource requires Linux containers when run on bare metal instances. + * + * @return true if there is possibility Linux containers are going to be started + */ + boolean requiresLinuxContainersOnBareMetal(); } diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/QuarkusScenario.java b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/QuarkusScenario.java index f646acc4b..0790a7291 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/QuarkusScenario.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/QuarkusScenario.java @@ -9,10 +9,12 @@ import org.junit.jupiter.api.extension.ExtendWith; import io.quarkus.test.bootstrap.QuarkusScenarioBootstrap; +import io.quarkus.test.scenarios.execution.condition.QuarkusScenarioExecutionConditions; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @ExtendWith(QuarkusScenarioBootstrap.class) +@ExtendWith(QuarkusScenarioExecutionConditions.class) @Inherited public @interface QuarkusScenario { } diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/AbstractQuarkusScenarioContainerExecutionCondition.java b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/AbstractQuarkusScenarioContainerExecutionCondition.java new file mode 100644 index 000000000..73c60165e --- /dev/null +++ b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/AbstractQuarkusScenarioContainerExecutionCondition.java @@ -0,0 +1,121 @@ +package io.quarkus.test.scenarios.execution.condition; + +import static java.lang.Boolean.FALSE; +import static java.lang.Boolean.TRUE; +import static java.lang.String.format; +import static java.lang.String.join; +import static org.junit.jupiter.api.extension.ConditionEvaluationResult.disabled; +import static org.junit.jupiter.api.extension.ConditionEvaluationResult.enabled; + +import java.lang.reflect.AnnotatedElement; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.jboss.logging.Logger; +import org.junit.jupiter.api.extension.ConditionEvaluationResult; +import org.junit.jupiter.api.extension.ExtensionContext; + +import io.quarkus.test.scenarios.QuarkusScenario; +import io.quarkus.test.utils.Command; + +public abstract class AbstractQuarkusScenarioContainerExecutionCondition implements QuarkusScenarioExecutionCondition { + + private static final Logger LOG = Logger.getLogger(AbstractQuarkusScenarioContainerExecutionCondition.class.getName()); + private static final ConditionEvaluationResult CONDITION_NOT_MATCHED = enabled("This condition should " + + "only be applied on test classes annotated with the '@QuarkusScenario' annotation"); + private static final ConditionEvaluationResult ENV_SUPPORTS_LINUX_CONTAINERS = enabled("Environment supports" + + " Linux containers"); + private static final String ENV_DOES_NOT_SUPPORT_LINUX_CONTAINERS = "Test class '%s' requires Linux containers, " + + "but the environment does not support them"; + private static final String LINUX_CONTAINERS_NOT_REQUIRED = "Test class '%s' does not require containers"; + private static final String LINUX_CONTAINER_OS_TYPE = "linux"; + private static final String PODMAN = "podman"; + private static final String DOCKER_HOST = "DOCKER_HOST"; + private static Boolean areLinuxContainersSupported = null; + + @Override + public final ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { + if (TRUE.equals(areLinuxContainersSupported)) { + // optimization - don't evaluate condition if we know Linux containers are available + return ENV_SUPPORTS_LINUX_CONTAINERS; + } + + return context + .getElement() + .filter(AbstractQuarkusScenarioContainerExecutionCondition::isQuarkusScenario) + .map(clazz -> (Class) clazz) + .map(this::evaluateExecutionCondition) + .orElse(CONDITION_NOT_MATCHED); + } + + private ConditionEvaluationResult evaluateExecutionCondition(Class testClass) { + if (areContainersRequired(testClass)) { + if (areLinuxContainersSupported()) { + return ENV_SUPPORTS_LINUX_CONTAINERS; + } + return disabled(format(ENV_DOES_NOT_SUPPORT_LINUX_CONTAINERS, testClass)); + } + return enabled(format(LINUX_CONTAINERS_NOT_REQUIRED, testClass)); + } + + protected abstract boolean areContainersRequired(Class testClass); + + private static synchronized boolean areLinuxContainersSupported() { + if (areLinuxContainersSupported == null) { + areLinuxContainersSupported = checkLinuxContainersSupported(); + } + return areLinuxContainersSupported; + } + + private static boolean checkLinuxContainersSupported() { + return isPodman() || dockerIsUsingLinuxContainers(); + } + + private static boolean dockerIsUsingLinuxContainers() { + final var osType = runDockerOsTypeInfoCommand(); + return osType + .stream() + .filter(str -> str.contains(LINUX_CONTAINER_OS_TYPE)) + .findAny() + .map(str -> TRUE) + .orElseGet(() -> { + LOG.debugf("Linux containers are required, but container type is: '%s'", join(" ", osType)); + return FALSE; + }); + } + + private static boolean isPodman() { + final String dockerHostEnvVar = System.getenv(DOCKER_HOST); + if (dockerHostEnvVar != null && dockerHostEnvVar.contains(PODMAN)) { + return true; + } + + try { + var output = new ArrayList(); + new Command("docker", "--version").outputToLines(output).runAndWait(); + return output.stream().anyMatch(line -> line.contains(PODMAN)); + } catch (Exception e) { + LOG.error("Failed to check whether Podman is used: ", e); + return false; + } + } + + private static boolean isQuarkusScenario(AnnotatedElement annotatedElement) { + return annotatedElement.isAnnotationPresent(QuarkusScenario.class); + } + + private static Collection runDockerOsTypeInfoCommand() { + try { + var output = new ArrayList(); + new Command("docker", "info", "--format", "'{{.OSType}}'") + .outputToLines(output) + .runAndWait(); + return output; + } catch (Exception e) { + LOG.error("Failed to check whether Linux containers are supported: ", e); + return List.of(); + } + } + +} diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/AnnotationBindingQuarkusScenarioContainerExecutionCondition.java b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/AnnotationBindingQuarkusScenarioContainerExecutionCondition.java new file mode 100644 index 000000000..d9737ebcb --- /dev/null +++ b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/AnnotationBindingQuarkusScenarioContainerExecutionCondition.java @@ -0,0 +1,31 @@ +package io.quarkus.test.scenarios.execution.condition; + +import java.util.Arrays; +import java.util.ServiceLoader; + +import io.quarkus.test.bootstrap.AnnotationBinding; + +/** + * Recognizes whether {@link AnnotationBinding} is associated to the resource that requires Linux containers and + * disables tests when not available. + */ +public class AnnotationBindingQuarkusScenarioContainerExecutionCondition + extends AbstractQuarkusScenarioContainerExecutionCondition { + + private final ServiceLoader bindingsRegistry = ServiceLoader.load(AnnotationBinding.class); + + @Override + protected boolean areContainersRequired(Class testClass) { + return bindingsRegistry + .stream() + .map(ServiceLoader.Provider::get) + .filter(AnnotationBinding::requiresLinuxContainersOnBareMetal) + .anyMatch(binding -> testClassHasFieldsAnnotatedWith(testClass, binding)); + } + + private static boolean testClassHasFieldsAnnotatedWith(Class testClass, AnnotationBinding binding) { + return testClass != null + && (Arrays.stream(testClass.getDeclaredFields()).anyMatch(binding::isFor) + || testClassHasFieldsAnnotatedWith(testClass.getSuperclass(), binding)); + } +} diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/QuarkusScenarioExecutionCondition.java b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/QuarkusScenarioExecutionCondition.java new file mode 100644 index 000000000..6d32ffa3f --- /dev/null +++ b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/QuarkusScenarioExecutionCondition.java @@ -0,0 +1,11 @@ +package io.quarkus.test.scenarios.execution.condition; + +import org.junit.jupiter.api.extension.ExecutionCondition; + +/** + * Services that provides required {@link ExecutionCondition} applied on every test class + * annotated with the QuarkusScenario annotation. + */ +public interface QuarkusScenarioExecutionCondition extends ExecutionCondition { + +} diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/QuarkusScenarioExecutionConditions.java b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/QuarkusScenarioExecutionConditions.java new file mode 100644 index 000000000..78dfa4665 --- /dev/null +++ b/quarkus-test-core/src/main/java/io/quarkus/test/scenarios/execution/condition/QuarkusScenarioExecutionConditions.java @@ -0,0 +1,28 @@ +package io.quarkus.test.scenarios.execution.condition; + +import static org.junit.jupiter.api.extension.ConditionEvaluationResult.enabled; + +import java.util.ServiceLoader; + +import org.junit.jupiter.api.extension.ConditionEvaluationResult; +import org.junit.jupiter.api.extension.ExecutionCondition; +import org.junit.jupiter.api.extension.ExtensionContext; + +public class QuarkusScenarioExecutionConditions implements ExecutionCondition { + + private static final ConditionEvaluationResult SUCCESS = enabled("All QuarkusScenario execution condition passed"); + private final ServiceLoader delegates = ServiceLoader + .load(QuarkusScenarioExecutionCondition.class); + + @Override + public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext extensionContext) { + for (ExecutionCondition delegate : delegates) { + var result = delegate.evaluateExecutionCondition(extensionContext); + if (result.isDisabled()) { + return result; + } + } + return SUCCESS; + } + +} diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/DevModeQuarkusApplicationAnnotationBinding.java b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/DevModeQuarkusApplicationAnnotationBinding.java index 939adc01b..138ddcba1 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/DevModeQuarkusApplicationAnnotationBinding.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/DevModeQuarkusApplicationAnnotationBinding.java @@ -22,4 +22,9 @@ public ManagedResourceBuilder createBuilder(Field field) { return builder; } + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return true; + } + } diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/GitRepositoryQuarkusApplicationAnnotationBinding.java b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/GitRepositoryQuarkusApplicationAnnotationBinding.java index f2f000473..cc2d31e26 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/GitRepositoryQuarkusApplicationAnnotationBinding.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/GitRepositoryQuarkusApplicationAnnotationBinding.java @@ -22,4 +22,9 @@ public ManagedResourceBuilder createBuilder(Field field) { return builder; } + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return false; + } + } diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusApplicationAnnotationBinding.java b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusApplicationAnnotationBinding.java index add662556..ae58149b0 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusApplicationAnnotationBinding.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/QuarkusApplicationAnnotationBinding.java @@ -22,4 +22,9 @@ public ManagedResourceBuilder createBuilder(Field field) throws Exception { return builder; } + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return false; + } + } diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/RemoteDevModeQuarkusApplicationAnnotationBinding.java b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/RemoteDevModeQuarkusApplicationAnnotationBinding.java index 49452cdbc..be79929ec 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/RemoteDevModeQuarkusApplicationAnnotationBinding.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/RemoteDevModeQuarkusApplicationAnnotationBinding.java @@ -22,4 +22,9 @@ public ManagedResourceBuilder createBuilder(Field field) { return builder; } + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return true; + } + } diff --git a/quarkus-test-core/src/main/resources/META-INF/services/io.quarkus.test.scenarios.execution.condition.QuarkusScenarioExecutionCondition b/quarkus-test-core/src/main/resources/META-INF/services/io.quarkus.test.scenarios.execution.condition.QuarkusScenarioExecutionCondition new file mode 100644 index 000000000..59c08aea7 --- /dev/null +++ b/quarkus-test-core/src/main/resources/META-INF/services/io.quarkus.test.scenarios.execution.condition.QuarkusScenarioExecutionCondition @@ -0,0 +1 @@ +io.quarkus.test.scenarios.execution.condition.AnnotationBindingQuarkusScenarioContainerExecutionCondition \ No newline at end of file diff --git a/quarkus-test-openshift/src/main/java/io/quarkus/test/services/operator/OperatorAnnotationBinding.java b/quarkus-test-openshift/src/main/java/io/quarkus/test/services/operator/OperatorAnnotationBinding.java index 918c55ed0..82561d4f7 100644 --- a/quarkus-test-openshift/src/main/java/io/quarkus/test/services/operator/OperatorAnnotationBinding.java +++ b/quarkus-test-openshift/src/main/java/io/quarkus/test/services/operator/OperatorAnnotationBinding.java @@ -20,4 +20,9 @@ public ManagedResourceBuilder createBuilder(Field field) { builder.init(metadata); return builder; } + + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return false; + } } diff --git a/quarkus-test-service-amq/src/main/java/io/quarkus/test/services/containers/AmqContainerAnnotationBinding.java b/quarkus-test-service-amq/src/main/java/io/quarkus/test/services/containers/AmqContainerAnnotationBinding.java index d005b62f2..0f44dc420 100644 --- a/quarkus-test-service-amq/src/main/java/io/quarkus/test/services/containers/AmqContainerAnnotationBinding.java +++ b/quarkus-test-service-amq/src/main/java/io/quarkus/test/services/containers/AmqContainerAnnotationBinding.java @@ -22,4 +22,9 @@ public ManagedResourceBuilder createBuilder(Field field) throws Exception { return builder; } + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return true; + } + } diff --git a/quarkus-test-service-jaeger/src/main/java/io/quarkus/test/services/containers/JaegerContainerAnnotationBinding.java b/quarkus-test-service-jaeger/src/main/java/io/quarkus/test/services/containers/JaegerContainerAnnotationBinding.java index e3e7236ce..764013c7f 100644 --- a/quarkus-test-service-jaeger/src/main/java/io/quarkus/test/services/containers/JaegerContainerAnnotationBinding.java +++ b/quarkus-test-service-jaeger/src/main/java/io/quarkus/test/services/containers/JaegerContainerAnnotationBinding.java @@ -20,4 +20,9 @@ public ManagedResourceBuilder createBuilder(Field field) throws Exception { builder.init(metadata); return builder; } + + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return true; + } } diff --git a/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/KafkaContainerAnnotationBinding.java b/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/KafkaContainerAnnotationBinding.java index 39bc99e3a..61cc3522e 100644 --- a/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/KafkaContainerAnnotationBinding.java +++ b/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/KafkaContainerAnnotationBinding.java @@ -22,4 +22,9 @@ public ManagedResourceBuilder createBuilder(Field field) throws Exception { return builder; } + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return true; + } + } diff --git a/quarkus-test-service-keycloak/src/main/java/io/quarkus/test/services/containers/KeycloakContainerAnnotationBinding.java b/quarkus-test-service-keycloak/src/main/java/io/quarkus/test/services/containers/KeycloakContainerAnnotationBinding.java index 9260cb9ee..58a4ebab6 100644 --- a/quarkus-test-service-keycloak/src/main/java/io/quarkus/test/services/containers/KeycloakContainerAnnotationBinding.java +++ b/quarkus-test-service-keycloak/src/main/java/io/quarkus/test/services/containers/KeycloakContainerAnnotationBinding.java @@ -20,4 +20,9 @@ public ManagedResourceBuilder createBuilder(Field field) throws Exception { builder.init(metadata); return builder; } + + @Override + public boolean requiresLinuxContainersOnBareMetal() { + return true; + } }