Merge pull request #2065 from vramik/KEYCLOAK-2347

KEYCLOAK-2347: Test - Adapter - EAP 7.0
This commit is contained in:
Stian Thorgersen 2016-01-20 14:18:58 +01:00
commit d7ee63f3c1
13 changed files with 366 additions and 2 deletions

View file

@ -0,0 +1,180 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<parent>
<groupId>org.keycloak.testsuite</groupId>
<artifactId>integration-arquillian-tests-adapters</artifactId>
<version>1.9.0.CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>integration-arquillian-adapters-eap7</artifactId>
<name>Adapter Tests on EAP 7</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>app-server-eap7</id>
<properties>
<app.server.eap7.home>${containers.home}/jboss-eap-7.0</app.server.eap7.home>
<adapter.libs.eap7>${containers.home}/keycloak-eap7-adapter-dist</adapter.libs.eap7>
</properties>
<!-- <dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
</dependency>
</dependencies>-->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-properties</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>version.eap7.dist</property>
</requireProperty>
<requireProperty>
<property>version.adapter.dist</property>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-eap7-with-adapters</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.jboss.eap</groupId>
<artifactId>wildfly-dist</artifactId>
<version>${version.eap7.dist}</version>
<type>zip</type>
<outputDirectory>${containers.home}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
<version>${version.adapter.dist}</version>
<type>zip</type>
<outputDirectory>${adapter.libs.eap7}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-saml-wildfly-adapter-dist</artifactId>
<version>${version.adapter.dist}</version>
<type>zip</type>
<outputDirectory>${adapter.libs.eap7}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>false</skip>
<systemPropertyVariables>
<app.server.eap7>true</app.server.eap7>
<app.server.eap7.home>${app.server.eap7.home}</app.server.eap7.home>
<adapter.libs.eap7>${adapter.libs.eap7}</adapter.libs.eap7>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>adapter-jdk</id>
<activation>
<property>
<name>adapter.jdk</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>add-java-home-to-arquillian-xml</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/dependency</dir>
<includes>
<include>arquillian.xml</include>
</includes>
<stylesheet>src/main/xslt/arquillian_jdk.xsl</stylesheet>
<parameters>
<parameter>
<name>javaHome</name>
<value>${adapter.jdk}</value>
</parameter>
</parameters>
<outputDir>${project.build.directory}/dependency</outputDir>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>adapter-libs-provided</id>
<activation>
<property>
<name>!adapter.libs.bundled</name>
</property>
</activation>
<properties>
<adapter.libs.eap7>${app.server.eap7.home}</adapter.libs.eap7>
</properties>
</profile>
</profiles>
</project>

View file

@ -0,0 +1,35 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:a="http://jboss.org/schema/arquillian"
version="2.0"
exclude-result-prefixes="xalan a">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/a:arquillian">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
<container qualifier="app-server-eap7" mode="manual" >
<configuration>
<property name="enabled">${app.server.eap7}</property>
<property name="adapterImplClass">org.jboss.as.arquillian.container.managed.ManagedDeployableContainer</property>
<property name="jbossHome">${app.server.eap7.home}</property>
<property name="javaVmArguments">-Djboss.socket.binding.port-offset=${app.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${adapter.test.props}</property>
<property name="managementPort">${app.server.management.port}</property>
</configuration>
</container>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,30 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:a="http://jboss.org/schema/arquillian"
version="2.0"
exclude-result-prefixes="xalan a">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="4" standalone="no"/>
<xsl:strip-space elements="*"/>
<xsl:param name="javaHome"/>
<xsl:template match="//*[local-name()='container' and @qualifier='app-server-eap7']/*[local-name()='configuration']">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
<property name="javaHome">
<xsl:value-of select="$javaHome"/>
</property>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,14 @@
package org.keycloak.testsuite.adapter.example;
import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-eap7")
@AdapterLibsLocationProperty("adapter.libs.eap7")
public class EAP7BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest {
}

View file

@ -0,0 +1,15 @@
package org.keycloak.testsuite.adapter.example;
import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
import org.junit.Ignore;
/**
* @author fkiss
*/
@AppServerContainer("app-server-eap7")
@AdapterLibsLocationProperty("adapter.libs.eap7")
@Ignore //cannot find web.xml in target/examples
public class EAP7CorsExampleAdapterTest extends AbstractCorsExampleAdapterTest {
}

View file

@ -0,0 +1,15 @@
package org.keycloak.testsuite.adapter.example;
import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
import org.junit.Ignore;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-eap7")
@AdapterLibsLocationProperty("adapter.libs.eap7")
public class EAP7DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest {
}

View file

@ -0,0 +1,14 @@
package org.keycloak.testsuite.adapter.example;
import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
import org.junit.Ignore;
/**
* @author tkyjovsk
*/
@AppServerContainer("app-server-eap7")
@AdapterLibsLocationProperty("adapter.libs.eap7")
@Ignore //jsconsole example has hardcoded relative path to keycloak.js
public class EAP7JSConsoleExampleAdapterTest extends AbstractJSConsoleExampleAdapterTest {
}

View file

@ -0,0 +1,14 @@
package org.keycloak.testsuite.adapter.example;
import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
import org.junit.Ignore;
/**
* @author mhajas
*/
@AppServerContainer("app-server-eap7")
@AdapterLibsLocationProperty("adapter.libs.eap7")
public class EAP7SAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest {
}

View file

@ -0,0 +1,16 @@
package org.keycloak.testsuite.adapter.servlet;
import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
import org.junit.Ignore;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-eap7")
@AdapterLibsLocationProperty("adapter.libs.eap7")
@Ignore //failing tests
public class EAP7DemoServletsAdapterTest extends AbstractDemoServletsAdapterTest {
}

View file

@ -0,0 +1,13 @@
package org.keycloak.testsuite.adapter.servlet;
import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
* @author mhajas
*/
@AppServerContainer("app-server-eap7")
@AdapterLibsLocationProperty("adapter.libs.eap7")
public class EAP7SAMLServletsAdapterTest extends AbstractSAMLServletsAdapterTest {
}

View file

@ -0,0 +1,14 @@
package org.keycloak.testsuite.adapter.servlet;
import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty;
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
/**
*
* @author tkyjovsk
*/
@AppServerContainer("app-server-eap7")
@AdapterLibsLocationProperty("adapter.libs.eap7")
public class EAP7SessionServletAdapterTest extends AbstractSessionServletAdapterTest {
}

View file

@ -390,6 +390,12 @@
<module>eap6</module>
</modules>
</profile>
<profile>
<id>app-server-eap7</id>
<modules>
<module>eap7</module>
</modules>
</profile>
<profile>
<id>app-server-wildfly</id>
<modules>

View file

@ -44,8 +44,6 @@
<skip.unpack.server>true</skip.unpack.server>
<skip.unpack.previous>true</skip.unpack.previous>
<skip.install.adapters>true</skip.install.adapters>
<jboss.server.config.dir>${project.build.directory}/undertow-configuration</jboss.server.config.dir>
</properties>
<dependencyManagement>