From e1ba26bcae50b4be8628a77a8aaa95897d179cd9 Mon Sep 17 00:00:00 2001 From: Tomas Kyjovsky Date: Tue, 10 Nov 2015 13:39:59 +0100 Subject: [PATCH] KEYCLOAK-1661 Added support for testing adapters/examples on fuse 6.2. Moved CustomKarafContainer from the base module to the adapters/karaf module. --- .../tests/adapters/karaf/pom.xml | 128 ++++++++++++------ .../karaf/CustomKarafContainer.java | 39 ++++-- .../CustomKarafContainerConfiguration.java | 0 .../karaf/CustomKarafContainerExtension.java | 17 +++ ...boss.arquillian.core.spi.LoadableExtension | 1 + .../karaf/src/main/xslt/arquillian-fuse.xsl | 6 +- .../karaf/src/main/xslt/arquillian.xsl | 6 +- .../tests/adapters/pom.xml | 10 +- .../integration-arquillian/tests/base/pom.xml | 8 -- .../KeycloakArquillianExtension.java | 5 +- .../integration-arquillian/tests/pom.xml | 26 ---- 11 files changed, 149 insertions(+), 97 deletions(-) rename testsuite/integration-arquillian/tests/{base => adapters/karaf}/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java (69%) rename testsuite/integration-arquillian/tests/{base => adapters/karaf}/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainerConfiguration.java (100%) create mode 100644 testsuite/integration-arquillian/tests/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainerExtension.java create mode 100644 testsuite/integration-arquillian/tests/adapters/karaf/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension diff --git a/testsuite/integration-arquillian/tests/adapters/karaf/pom.xml b/testsuite/integration-arquillian/tests/adapters/karaf/pom.xml index 55ad00c875..e6c72f3d47 100644 --- a/testsuite/integration-arquillian/tests/adapters/karaf/pom.xml +++ b/testsuite/integration-arquillian/tests/adapters/karaf/pom.xml @@ -12,9 +12,6 @@ Adapter Tests on Karaf - 3.0.3 - ${containers.home}/apache-karaf-minimal-${karaf.version} - 0 @@ -27,13 +24,6 @@ - - org.apache.karaf - apache-karaf-minimal - ${karaf.version} - zip - - org.jboss.arquillian.container arquillian-container-karaf-managed @@ -46,37 +36,97 @@ 1.1.1 + + jline + jline + 2.12 + + + org.apache.sshd + sshd-core + 0.12.0 + + + org.apache.karaf.shell + org.apache.karaf.shell.console + 3.0.3 + + + org.apache.karaf + org.apache.karaf.client + 3.0.3 + + - + + + + + fuse + + + fuse.home + + + + ${fuse.home} + src/main/xslt/arquillian-fuse.xsl + + + + + karaf + + + !fuse.home + + + + 3.0.3 + ${containers.home}/apache-karaf-minimal-${karaf.version} + + + + org.apache.karaf + apache-karaf-minimal + ${karaf.version} + zip + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-karaf + generate-resources + + unpack + + + + + org.apache.karaf + apache-karaf-minimal + ${karaf.version} + zip + ${containers.home} + + + true + + + + + + + + + - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-karaf - generate-resources - - unpack - - - - - org.apache.karaf - apache-karaf-minimal - ${karaf.version} - zip - ${containers.home} - - - true - - - - - org.apache.maven.plugins maven-surefire-plugin @@ -93,5 +143,5 @@ - + diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java b/testsuite/integration-arquillian/tests/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java similarity index 69% rename from testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java rename to testsuite/integration-arquillian/tests/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java index fb90f835b2..e9f12127a5 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java +++ b/testsuite/integration-arquillian/tests/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java @@ -27,7 +27,7 @@ public class CustomKarafContainer extends KarafManagedDeployableContainer + + @@ -23,8 +25,8 @@ admin - features:addurl mvn:org.keycloak/keycloak-osgi-features/1.7.0.Final-SNAPSHOT/xml/features, - features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.7.0.Final-SNAPSHOT/xml/features, + features:addurl mvn:org.keycloak/keycloak-osgi-features//xml/features, + features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features//xml/features, features:install keycloak-fuse-example diff --git a/testsuite/integration-arquillian/tests/adapters/karaf/src/main/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/adapters/karaf/src/main/xslt/arquillian.xsl index b6aa589019..3d6f71854a 100644 --- a/testsuite/integration-arquillian/tests/adapters/karaf/src/main/xslt/arquillian.xsl +++ b/testsuite/integration-arquillian/tests/adapters/karaf/src/main/xslt/arquillian.xsl @@ -4,6 +4,8 @@ version="2.0" exclude-result-prefixes="xalan a"> + + @@ -27,8 +29,8 @@ feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.15.1/xml/features, feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/3.0.4/xml/features, - feature:repo-add mvn:org.keycloak/keycloak-osgi-features/1.7.0.Final-SNAPSHOT/xml/features, - feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features/1.7.0.Final-SNAPSHOT/xml/features, + feature:repo-add mvn:org.keycloak/keycloak-osgi-features//xml/features, + feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features//xml/features, feature:install keycloak-fuse-example diff --git a/testsuite/integration-arquillian/tests/adapters/pom.xml b/testsuite/integration-arquillian/tests/adapters/pom.xml index 1e4fdfa97e..ee81124381 100644 --- a/testsuite/integration-arquillian/tests/adapters/pom.xml +++ b/testsuite/integration-arquillian/tests/adapters/pom.xml @@ -19,6 +19,8 @@ 10199 -Dapp.server.base.url=http://localhost:${app.server.http.port} -Dmy.host.name=localhost - + + src/main/xslt/arquillian.xsl @@ -66,7 +68,13 @@ arquillian.xml - src/main/xslt/arquillian.xsl + ${arquillian.xml.stylesheet} + + + keycloak.version + ${project.version} + + ${project.build.directory}/dependency diff --git a/testsuite/integration-arquillian/tests/base/pom.xml b/testsuite/integration-arquillian/tests/base/pom.xml index 41038cde19..6317df80ba 100644 --- a/testsuite/integration-arquillian/tests/base/pom.xml +++ b/testsuite/integration-arquillian/tests/base/pom.xml @@ -16,14 +16,6 @@ - - - - org.jboss.arquillian.container - arquillian-container-karaf-managed - 2.1.0.CR18 - - - diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java index 5c82c3f551..b8b232320e 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java @@ -9,8 +9,6 @@ import org.jboss.arquillian.core.spi.LoadableExtension; import org.jboss.arquillian.graphene.location.CustomizableURLResourceProvider; import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider; import org.jboss.arquillian.test.spi.execution.TestExecutionDecider; -import org.keycloak.testsuite.arquillian.jira.JiraTestExecutionDecider; -import org.keycloak.testsuite.arquillian.karaf.CustomKarafContainer; import org.keycloak.testsuite.arquillian.migration.MigrationTestExecutionDecider; import org.keycloak.testsuite.arquillian.undertow.CustomUndertowContainer; @@ -35,8 +33,7 @@ public class KeycloakArquillianExtension implements LoadableExtension { .observer(ContainersTestEnricher.class); builder - .service(DeployableContainer.class, CustomUndertowContainer.class) - .service(DeployableContainer.class, CustomKarafContainer.class); + .service(DeployableContainer.class, CustomUndertowContainer.class); builder //.service(TestExecutionDecider.class, JiraTestExecutionDecider.class) diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml index b339d11602..074a08a1de 100644 --- a/testsuite/integration-arquillian/tests/pom.xml +++ b/testsuite/integration-arquillian/tests/pom.xml @@ -340,32 +340,6 @@ infinispan-core - - jline - jline - 2.12 - - - org.apache.sshd - sshd-core - 0.12.0 - - - org.apache.karaf.shell - org.apache.karaf.shell.console - 3.0.3 - - - org.apache.karaf - org.apache.karaf.client - 3.0.3 - - - org.apache.aries.jmx - org.apache.aries.jmx - 1.1.1 - -