Skip to content

Commit

Permalink
Merge pull request #36 from maschmid/SEAMSECURITY-119
Browse files Browse the repository at this point in the history
SEAMSECURITY-119 update testsuite structure
  • Loading branch information
sbryzak committed Oct 18, 2011
2 parents a8cf08f + 00ad0bb commit e6f228b
Show file tree
Hide file tree
Showing 33 changed files with 188 additions and 83 deletions.
64 changes: 1 addition & 63 deletions external/pom.xml
Expand Up @@ -15,6 +15,7 @@
<url>${project.parent.url}</url>

<build>
<finalName>seam-security-external</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -170,20 +171,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
Expand All @@ -205,55 +192,6 @@
<version>1.9.12</version>
</dependency>

<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.0</version>
<scope>test</scope>
</dependency>

</dependencies>

<profiles>
<profile>
<id>jbossas-managed-7</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.seam.test</groupId>
<artifactId>jbossas-managed-7</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

<profile>
<id>jbossas-remote-7</id>
<dependencies>
<dependency>
<groupId>org.jboss.seam.test</groupId>
<artifactId>jbossas-managed-7</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

</profiles>

</project>
1 change: 1 addition & 0 deletions pom.xml
Expand Up @@ -18,6 +18,7 @@
<module>api</module>
<module>impl</module>
<module>external</module>
<module>testsuite</module>
</modules>

<properties>
Expand Down
171 changes: 171 additions & 0 deletions testsuite/pom.xml
@@ -0,0 +1,171 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jboss.seam.security</groupId>
<artifactId>seam-security-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>org.jboss.seam.security</groupId>
<artifactId>seam-security-testsuite</artifactId>
<packaging>jar</packaging>
<name>Seam Security Test Suite</name>

<dependencies>

<dependency>
<groupId>org.jboss.seam.security</groupId>
<artifactId>seam-security</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.seam.security</groupId>
<artifactId>seam-security-external</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.solder</groupId>
<artifactId>solder-impl</artifactId>
</dependency>

<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<!-- Required until the Servlet 3.0 API can be resolved in Central -->
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.0.0.GA</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<activation>
<property>
<name>arquillian</name>
</property>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
<systemProperties>
<arquillian.launch>${arquillian}</arquillian.launch>
<arquillian>${arquillian}</arquillian>
</systemProperties>
</configuration>

<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<trimStackTrace>false</trimStackTrace>
<printSummary>true</printSummary>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>jbossas-managed-7</id>
<activation>
<property>
<name>arquillian</name>
<value>jbossas-managed-7</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.seam.test</groupId>
<artifactId>jbossas-managed-7</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

<profile>
<id>jbossas-remote-7</id>
<activation>
<property>
<name>arquillian</name>
<value>jbossas-remote-7</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.seam.test</groupId>
<artifactId>jbossas-remote-7</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

</profiles>

</project>
@@ -1,5 +1,6 @@
package org.jboss.seam.security.externaltest.integration.client;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -15,6 +16,7 @@
import org.jboss.seam.security.externaltest.integration.saml.sp.SpCustomizer;
import org.jboss.shrinkwrap.api.GenericArchive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;

Expand All @@ -41,15 +43,20 @@ static private WebArchive createTestArchive(String entity) {
WebArchive war = ShrinkWrap.create(WebArchive.class, entity + ".war");

war.addAsLibraries(DependencyResolvers.use(MavenDependencyResolver.class)
.loadReposFromPom("pom.xml")
.artifact("org.jboss.seam.security:seam-security")
.loadReposFromPom("../external/pom.xml")
.artifact("org.jboss.solder:solder-impl")
.artifact("org.jboss.seam.security:seam-security")
.artifact("org.openid4java:openid4java-consumer:pom").exclusion("xerces:xercesImpl")
.artifact("nekohtml:nekohtml")
.artifact("org.apache:xmlsec")
.artifact("commons-httpclient:commons-httpclient")
.resolveAs(GenericArchive.class));

war.addAsLibraries(
ShrinkWrap.create(ZipImporter.class, "seam-security-external.jar")
.importFrom(new File("../external/target/seam-security-external.jar"))
.as(JavaArchive.class));

war.addAsWebInfResource("WEB-INF/" + entity + "-beans.xml", "beans.xml");
war.addAsWebInfResource("WEB-INF/" + entity + "-seam-beans.xml", "classes/META-INF/seam-beans.xml");
war.addAsWebInfResource("WEB-INF/context.xml", "context.xml");
Expand All @@ -67,22 +74,6 @@ static private WebArchive createTestArchive(String entity) {
war.addPackage(RpCustomizer.class.getPackage());
}

war.addAsLibrary(createJarModule());

return war;
}

private static JavaArchive createJarModule() {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "test.jar");

// Add the package "org.jboss.seam.security.external" and all its
// subpackages.
jar.addPackages(true, ResponseHandler.class.getPackage());

jar.addAsManifestResource("META-INF/beans.xml", "beans.xml");
jar.addAsManifestResource("META-INF/web-fragment.xml", "web-fragment.xml");
jar.addAsServiceProvider(Extension.class, VirtualApplicationContextExtension.class, DialogueContextExtension.class);

return jar;
}
}
File renamed without changes.
Expand Up @@ -9,10 +9,14 @@
</engine>
-->

<container qualifier="jbossas-managed-7" default="true">
<container qualifier="jbossas-managed-7">
<configuration>
<property name="javaVmArguments">-client -noverify -XX:+UseFastAccessorMethods -Xms64m -Xmx1024m -XX:MaxPermSize=512m -Dsun.net.http.allowRestrictedHeaders=true</property>
</configuration>
</configuration>
</container>

<container qualifier="jbossas-remote-7">

</container>

</arquillian>
File renamed without changes.
File renamed without changes.
Binary file added testsuite/src/test/resources/test_keystore.jks
Binary file not shown.

0 comments on commit e6f228b

Please sign in to comment.