Skip to content

Commit

Permalink
[Windows] Stabilizing QuarkusPropertiesDistTest
Browse files Browse the repository at this point in the history
Closes: keycloak#35496

Signed-off-by: Peter Zaoral <[email protected]>
  • Loading branch information
Pepo48 committed Dec 5, 2024
1 parent 9638eb2 commit 616c577
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.keycloak.it.junit5.extension.BeforeStartDistribution;
import org.keycloak.it.junit5.extension.CLIResult;
Expand Down Expand Up @@ -78,7 +79,7 @@ void testIgnoreQuarkusSystemPropertiesAtStart(CLIResult cliResult) {

@Test
@Launch({"-Dquarkus.log.handler.console.\\\"console-2\\\".enable=false", "start", "--http-enabled=true", "--hostname-strict=false"})
@DisabledOnOs(value = { OS.LINUX, OS.MAC }, disabledReason = "Different handling of quotes within arguments on Windows")
@EnabledOnOs(value = { OS.WINDOWS }, disabledReason = "Different handling of quotes within arguments on Windows")
@Order(3)
void testIgnoreQuarkusSystemPropertiesAtStartWin(CLIResult cliResult) {
cliResult.assertMessage("Keycloak is the best");
Expand All @@ -95,7 +96,7 @@ void testIgnoreQuarkusSystemPropertyAtBuild(CLIResult cliResult) {

@Test
@Launch({"-Dquarkus.log.handler.console.\\\"console-2\\\".enable=false", "build"})
@DisabledOnOs(value = { OS.LINUX, OS.MAC }, disabledReason = "Different handling of quotes within arguments on Windows")
@EnabledOnOs(value = { OS.WINDOWS }, disabledReason = "Different handling of quotes within arguments on Windows")
@Order(4)
void testIgnoreQuarkusSystemPropertyAtBuildWin(CLIResult cliResult) {
cliResult.assertMessage("Keycloak is the best");
Expand Down Expand Up @@ -175,7 +176,7 @@ void testInvalidSmallRyeKeyStorePathProperty(CLIResult cliResult) {
@Test
@Launch({ "start", "--http-enabled=true", "--hostname-strict=false", "--config-keystore=C:\\invalid\\path",
"--config-keystore-password=secret" })
@DisabledOnOs(value = { OS.LINUX, OS.MAC }, disabledReason = "Windows uses a different path separator.")
@EnabledOnOs(value = { OS.WINDOWS }, disabledReason = "Windows uses a different path separator.")
@Order(11)
void testInvalidSmallRyeKeyStorePathPropertyWin(CLIResult cliResult) {
cliResult.assertError("java.lang.IllegalArgumentException: config-keystore path does not exist: C:\\invalid\\path");
Expand Down

0 comments on commit 616c577

Please sign in to comment.