-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move DisabledOnRHBQWindowsConditions from testsuite to framework
- Loading branch information
1 parent
cb6ad5a
commit 8103989
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
.../src/main/java/io/quarkus/test/scenarios/annotations/DisabledOnRHBQWindowsConditions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.quarkus.test.scenarios.annotations; | ||
|
||
import org.junit.jupiter.api.extension.ConditionEvaluationResult; | ||
import org.junit.jupiter.api.extension.ExecutionCondition; | ||
import org.junit.jupiter.api.extension.ExtensionContext; | ||
|
||
import io.quarkus.test.services.quarkus.model.QuarkusProperties; | ||
import io.smallrye.common.os.OS; | ||
|
||
public class DisabledOnRHBQWindowsConditions implements ExecutionCondition { | ||
|
||
@Override | ||
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext extensionContext) { | ||
boolean isWindows = OS.current().equals(OS.WINDOWS); | ||
if (QuarkusProperties.isRHBQ() && isWindows) { | ||
return ConditionEvaluationResult.disabled("It is RHBQ on Windows"); | ||
} else { | ||
return ConditionEvaluationResult.enabled("It is not RHBQ on Windows"); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...st-core/src/main/java/io/quarkus/test/scenarios/annotations/DisabledOnRHBQandWindows.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.quarkus.test.scenarios.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
import org.junit.jupiter.api.extension.ExtendWith; | ||
|
||
@Inherited | ||
@Target({ ElementType.TYPE, ElementType.METHOD }) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@ExtendWith(DisabledOnRHBQWindowsConditions.class) | ||
public @interface DisabledOnRHBQandWindows { | ||
|
||
/** | ||
* Why is the annotated test class or test method disabled. | ||
*/ | ||
String reason(); | ||
} |