From 4b50fdb404efa51c55fee481fd44a5e292f5b9ab Mon Sep 17 00:00:00 2001 From: vramik Date: Thu, 29 Nov 2018 13:32:25 +0100 Subject: [PATCH] KEYCLOAK-8955 adapter installation fails on windows - edit logging --- .../jboss/common/win/run-jboss-cli.bat | 6 + .../servers/app-server/jboss/eap6/pom.xml | 333 +++++++++--------- .../resources/config/fuse/install-fuse.bat | 11 - .../fuse/EAP6Fuse6HawtioAdapterTest.java | 7 + 4 files changed, 188 insertions(+), 169 deletions(-) delete mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/eap6/src/main/resources/config/fuse/install-fuse.bat diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/win/run-jboss-cli.bat b/testsuite/integration-arquillian/servers/app-server/jboss/common/win/run-jboss-cli.bat index fd4a87f124..6cfbeb40c6 100644 --- a/testsuite/integration-arquillian/servers/app-server/jboss/common/win/run-jboss-cli.bat +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/win/run-jboss-cli.bat @@ -1,16 +1,22 @@ +@echo off + set "NOPAUSE=true" set cli_file=%2 set working_dir=%3 cd %working_dir% +echo working_dir: %cd% if "%4"=="-Dserver.config" ( set server_config=%5 ) else ( set server_config=standalone.xml ) +echo server.config=%server_config% +echo cli_file=%cli_file% if "%4"=="-Djboss.server.config.dir" ( + echo jboss.server.config.dir=%5 jboss-cli.bat --file=%cli_file% -Dserver.config=%server_config% -Djboss.server.config.dir=%5 ) else ( jboss-cli.bat --file=%cli_file% -Dserver.config=%server_config% diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml index 529a271e55..bc5669174e 100644 --- a/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml +++ b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml @@ -67,90 +67,6 @@ - - maven-enforcer-plugin - - - enforce-auth-server-jboss-profile - - enforce - - - - - eap6.version - - - fuse63.version - - - - - - - - maven-resources-plugin - - - backup-configs-fuse - generate-test-sources - - copy-resources - - - ${app.server.jboss.home}/standalone-default - - - ${app.server.jboss.home}/standalone - - - - - - copy-hawtio-jsons - generate-test-resources - - copy-resources - - - ${app.server.jboss.home}/standalone-fuse/configuration - - - ${basedir}/src/main/resources/config/fuse - - keycloak-hawtio.json - keycloak-hawtio-client.json - - true - - - - - - - - maven-dependency-plugin - - - unpack-fuse-installer - process-resources - - copy - - - - - ${fuse.installer.groupId} - ${fuse.installer.artifactId} - ${fuse.installer.version} - jar - ${app.server.jboss.home} - - - - - - org.codehaus.mojo exec-maven-plugin @@ -188,22 +104,6 @@ - - install-fuse - generate-test-sources - - exec - - - ${basedir}/src/main/resources/config/fuse/install-fuse.${script.suffix} - ${app.server.jboss.home}/standalone-fuse - - ${app.server.java.home} - ${app.server.jboss.home} - ${fuse.installer.artifactId}-${fuse.installer.version}.jar - - - add-secured-deployments-eap6 generate-test-sources @@ -222,65 +122,182 @@ - - org.codehaus.mojo - xml-maven-plugin - - - add-hawtio-to-standalone-fuse - process-test-resources - - transform - - - - - ${app.server.jboss.home}/standalone-fuse/configuration - - standalone.xml - - ${basedir}/src/main/resources/config/fuse/add-hawtio.xsl - ${app.server.jboss.home}/standalone-fuse/configuration - - - - - - - - maven-antrun-plugin - - - move-configs-fuse - process-test-sources - - run - - - - - - - - - - restore-configs-after-fuse-installation - process-test-sources - - run - - - - - - - - - - + + + fuse-installer + + + unix + + + + + + maven-enforcer-plugin + + + enforce-fuse63-version + + enforce + + + + + fuse63.version + + + + + + + + maven-resources-plugin + + + backup-configs-fuse + generate-test-sources + + copy-resources + + + ${app.server.jboss.home}/standalone-default + + + ${app.server.jboss.home}/standalone + + + + + + copy-hawtio-jsons + generate-test-resources + + copy-resources + + + ${app.server.jboss.home}/standalone-fuse/configuration + + + ${basedir}/src/main/resources/config/fuse + + keycloak-hawtio.json + keycloak-hawtio-client.json + + true + + + + + + + + maven-dependency-plugin + + + unpack-fuse-installer + process-resources + + copy + + + + + ${fuse.installer.groupId} + ${fuse.installer.artifactId} + ${fuse.installer.version} + jar + ${app.server.jboss.home} + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + install-fuse + generate-test-sources + + exec + + + ${basedir}/src/main/resources/config/fuse/install-fuse.${script.suffix} + ${app.server.jboss.home}/standalone-fuse + + ${app.server.java.home} + ${app.server.jboss.home} + ${fuse.installer.artifactId}-${fuse.installer.version}.jar + + + + + + + org.codehaus.mojo + xml-maven-plugin + + + add-hawtio-to-standalone-fuse + process-test-resources + + transform + + + + + ${app.server.jboss.home}/standalone-fuse/configuration + + standalone.xml + + ${basedir}/src/main/resources/config/fuse/add-hawtio.xsl + ${app.server.jboss.home}/standalone-fuse/configuration + + + + + + + + maven-antrun-plugin + + + move-configs-fuse + process-test-sources + + run + + + + + + + + + + restore-configs-after-fuse-installation + process-test-sources + + run + + + + + + + + + + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/eap6/src/main/resources/config/fuse/install-fuse.bat b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/src/main/resources/config/fuse/install-fuse.bat deleted file mode 100644 index 16777d26f6..0000000000 --- a/testsuite/integration-arquillian/servers/app-server/jboss/eap6/src/main/resources/config/fuse/install-fuse.bat +++ /dev/null @@ -1,11 +0,0 @@ -set NOPAUSE=true - -cd %JBOSS_HOME% -start javaw -jar %FUSE_INSTALLER_NAME% -ping 127.0.0.1 -n 40 > nul -del %FUSE_INSTALLER_NAME% - -set JBOSS_HOME=%JBOSS_HOME:/=\% -ren %JBOSS_HOME%\standalone\deployments\hawtio*.war hawtio.war - -exit 0 \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/EAP6Fuse6HawtioAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/EAP6Fuse6HawtioAdapterTest.java index 1ebadfc666..5ae7fdd724 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/EAP6Fuse6HawtioAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/fuse/EAP6Fuse6HawtioAdapterTest.java @@ -28,7 +28,9 @@ import org.jboss.arquillian.drone.api.annotation.Drone; import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.test.api.ArquillianResource; import org.junit.After; +import org.junit.Assume; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Test; import org.keycloak.representations.idm.RealmRepresentation; @@ -71,6 +73,11 @@ public class EAP6Fuse6HawtioAdapterTest extends AbstractExampleAdapterTest imple testRealms.add(loadRealm("/adapter-test/hawtio-realm/demorealm.json")); } + @BeforeClass + public static void enabled() { + Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows")); + } + @Before public void addJSDriver() { DroneUtils.addWebDriver(jsDriver);