-
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.
Add opt encrypted communication for MSSQL
- Loading branch information
1 parent
374e6b9
commit cb36645
Showing
18 changed files
with
464 additions
and
51 deletions.
There are no files selected for viewing
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
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
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
20 changes: 20 additions & 0 deletions
20
...est-core/src/main/java/io/quarkus/test/scenarios/annotations/DisabledOnFipsAndJava17.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,20 @@ | ||
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(DisabledOnFipsAndJava17Condition.class) | ||
public @interface DisabledOnFipsAndJava17 { | ||
/** | ||
* Why is the annotated test class or test method disabled. | ||
*/ | ||
String reason() default ""; | ||
} |
31 changes: 31 additions & 0 deletions
31
...src/main/java/io/quarkus/test/scenarios/annotations/DisabledOnFipsAndJava17Condition.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,31 @@ | ||
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; | ||
|
||
public class DisabledOnFipsAndJava17Condition implements ExecutionCondition { | ||
|
||
/** | ||
* We set environment variable "FIPS" to "fips" in our Jenkins jobs when FIPS are enabled. | ||
*/ | ||
private static final String FIPS_ENABLED = "fips"; | ||
private static final int JAVA_17 = 17; | ||
|
||
@Override | ||
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { | ||
if (isFipsEnabledEnvironment() && isJava17()) { | ||
return ConditionEvaluationResult.disabled("The test is running in FIPS enabled environment with Java 17"); | ||
} | ||
|
||
return ConditionEvaluationResult.enabled("The test is not running in FIPS enabled environment with Java 17"); | ||
} | ||
|
||
private static boolean isFipsEnabledEnvironment() { | ||
return FIPS_ENABLED.equals(System.getenv().get("FIPS")); | ||
} | ||
|
||
private static boolean isJava17() { | ||
return JAVA_17 == Runtime.version().feature(); | ||
} | ||
} |
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
Oops, something went wrong.