From 39cff0750cb82e0e11872373c0c91138640d715a Mon Sep 17 00:00:00 2001 From: nehachopra27 Date: Wed, 15 Jun 2022 15:29:11 +0100 Subject: [PATCH] [Fix keycloak#12385] Update option to run kc.bat on windows instead of kc.sh (#12386) Co-authored-by: nchopra Resolves #12385 --- .../KeycloakQuarkusServerDeployableContainer.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/KeycloakQuarkusServerDeployableContainer.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/KeycloakQuarkusServerDeployableContainer.java index 4b1afe962a..8eb3b74965 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/KeycloakQuarkusServerDeployableContainer.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/KeycloakQuarkusServerDeployableContainer.java @@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.SystemUtils; import org.jboss.arquillian.container.spi.client.container.DeployableContainer; import org.jboss.arquillian.container.spi.client.container.DeploymentException; import org.jboss.arquillian.container.spi.client.container.LifecycleException; @@ -149,8 +150,7 @@ public class KeycloakQuarkusServerDeployableContainer implements DeployableConta private String[] getProcessCommands() { List commands = new ArrayList<>(); - - commands.add("./kc.sh"); + commands.add(getCommand()); commands.add("-v"); commands.add("start"); commands.add("--http-enabled=true"); @@ -297,6 +297,13 @@ public class KeycloakQuarkusServerDeployableContainer implements DeployableConta start(); } + private static String getCommand() { + if (SystemUtils.IS_OS_WINDOWS) { + return "kc.bat"; + } + return "./kc.sh"; + } + public List getAdditionalBuildArgs() { return additionalBuildArgs; }