[picketlink-commits] Picketlink SVN: r279 - integation-tests and 17 other directories.

picketlink-commits at lists.jboss.org picketlink-commits at lists.jboss.org
Fri Jun 4 15:55:41 EDT 2010


Author: anil.saldhana at jboss.com
Date: 2010-06-04 15:55:40 -0400 (Fri, 04 Jun 2010)
New Revision: 279

Added:
   integation-tests/
   integation-tests/branches/
   integation-tests/tags/
   integation-tests/trunk/
   integation-tests/trunk/common-dist/
   integation-tests/trunk/common-dist/jbossas/
   integation-tests/trunk/common-dist/jbossas/5.1.0.GA/
   integation-tests/trunk/common-dist/jbossas/5.1.0.GA/jboss-5.1.0.GA-jdk6.zip
   integation-tests/trunk/common-dist/scripts/
   integation-tests/trunk/common-dist/scripts/stopjboss.sh
   integation-tests/trunk/common-dist/tomcat/
   integation-tests/trunk/common-dist/tomcat/6.0.26/
   integation-tests/trunk/common-dist/tomcat/6.0.26/apache-tomcat-6.0.26.zip
   integation-tests/trunk/common-dist/tomcat/log4j.xml
   integation-tests/trunk/common-dist/tomcat/tomcat-users.xml
   integation-tests/trunk/parent/
   integation-tests/trunk/parent/pom.xml
   integation-tests/trunk/picketlink-saml-tests/
   integation-tests/trunk/picketlink-saml-tests/ant-build.xml
   integation-tests/trunk/picketlink-saml-tests/pom.xml
   integation-tests/trunk/picketlink-saml-tests/src/
   integation-tests/trunk/picketlink-saml-tests/src/test/
   integation-tests/trunk/picketlink-saml-tests/src/test/java/
   integation-tests/trunk/picketlink-saml-tests/src/test/java/org/
   integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/
   integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/
   integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/
   integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/
   integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2MixedBindingGlobalLogOutUnitTestCase.java
   integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2PostBindingGlobalLogOutUnitTestCase.java
   integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2RedirectBindingGlobalLogOutUnitTestCase.java
   integation-tests/trunk/picketlink-saml-tests/src/test/resources/
   integation-tests/trunk/pom.xml
Log:
PLFED-81: integration test workspace

Added: integation-tests/trunk/common-dist/jbossas/5.1.0.GA/jboss-5.1.0.GA-jdk6.zip
===================================================================
(Binary files differ)


Property changes on: integation-tests/trunk/common-dist/jbossas/5.1.0.GA/jboss-5.1.0.GA-jdk6.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: integation-tests/trunk/common-dist/scripts/stopjboss.sh
===================================================================
--- integation-tests/trunk/common-dist/scripts/stopjboss.sh	                        (rev 0)
+++ integation-tests/trunk/common-dist/scripts/stopjboss.sh	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,2 @@
+#!/bin/ksh
+ps -u`whoami` -opid,comm,args | grep "org.jboss.Main" | awk '{ print $1 }' | xargs kill -9


Property changes on: integation-tests/trunk/common-dist/scripts/stopjboss.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: integation-tests/trunk/common-dist/tomcat/6.0.26/apache-tomcat-6.0.26.zip
===================================================================
(Binary files differ)


Property changes on: integation-tests/trunk/common-dist/tomcat/6.0.26/apache-tomcat-6.0.26.zip
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: integation-tests/trunk/common-dist/tomcat/log4j.xml
===================================================================
--- integation-tests/trunk/common-dist/tomcat/log4j.xml	                        (rev 0)
+++ integation-tests/trunk/common-dist/tomcat/log4j.xml	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!--
+   | For more configuration information and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
+      <param name="File" value="target/apache-tomcat-6.0.26/logs/server.log"/>
+      <param name="Append" value="false"/>
+      <!-- 
+         Set the threshold via a system property. Note this is parsed by log4j,
+         so the full JBoss system property format is not supported; e.g.
+         setting a default via ${jboss.server.log.threshold:WARN} will not work.         
+       -->
+      <param name="Threshold" value="TRACE"/>
+
+      <!-- Rollover at midnight each day -->
+      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+      <!-- Rollover at the top of each hour
+      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+      -->
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] (Thread) Message\n -->
+         <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/>
+
+         <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+         <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+          -->
+      </layout>
+   </appender>
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+   <category name="org.apache">
+      <priority value="TRACE"/>
+   </category>
+   <category name="org.jboss">
+      <priority value="TRACE"/>
+   </category>
+   <category name="org.picketlink">
+      <priority value="TRACE"/>
+   </category>
+   
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>

Added: integation-tests/trunk/common-dist/tomcat/tomcat-users.xml
===================================================================
--- integation-tests/trunk/common-dist/tomcat/tomcat-users.xml	                        (rev 0)
+++ integation-tests/trunk/common-dist/tomcat/tomcat-users.xml	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tomcat-users>
+  <role rolename="Sales"/>
+  <role rolename="manager"/>
+  <role rolename="user"/>
+  <role rolename="Employee"/>
+  <user username="manager" password="tomcat" roles="manager,Sales,Employee"/>
+  <user username="tomcat" password="tomcat" roles="manager,Sales,Employee"/>
+</tomcat-users>

Added: integation-tests/trunk/parent/pom.xml
===================================================================
--- integation-tests/trunk/parent/pom.xml	                        (rev 0)
+++ integation-tests/trunk/parent/pom.xml	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,193 @@
+<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">
+   <parent>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-parent</artifactId>
+      <version>5</version>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.picketlink</groupId>
+   <artifactId>picketlink-integration-tests-parent</artifactId>
+   <packaging>pom</packaging>
+   <version>1.0.3.CR4-SNAPSHOT</version>
+   <name>PicketLink Integration Tests- Parent</name>
+   <url>http://labs.jboss.org/portal/picketlink/</url>
+   <description>PicketLink is a cross-cutting project that handles identity  needs for the JEMS projects</description>
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <scm>
+      <connection>scm:svn:http://anonsvn.jboss.org/repos/picketlink/federation/tags/1.0.0.alpha1</connection>
+      <developerConnection>scm:svn:https://svn.jboss.org/repos/picketlink/federation/tags/1.0.0.alpha1</developerConnection>
+   </scm>
+  
+   <build>
+     <plugins>
+        <plugin>
+          <artifactId>maven-release-plugin</artifactId>
+          <configuration>
+            <tagBase>https://svn.jboss.org/repos/jbossidentity/migration/picketlink/federation/tags</tagBase>
+          </configuration>
+        </plugin>
+     </plugins>
+     <pluginManagement>
+       <plugins>
+          <plugin>
+             <artifactId>maven-surefire-plugin</artifactId>
+             <configuration>
+               <printSummary>true</printSummary>
+               <disableXmlReport>false</disableXmlReport>
+               <testFailureIgnore>true</testFailureIgnore>
+               <includes>
+                 <include>**/**TestCase.java</include>
+               </includes>
+               <forkMode>pertest</forkMode>
+               <argLine>${surefire.jvm.args}</argLine>
+               <useFile>false</useFile>
+               <trimStackTrace>false</trimStackTrace>
+             </configuration>
+          </plugin>
+          <plugin>
+             <groupId>org.apache.maven.plugins</groupId>
+             <artifactId>maven-antrun-plugin</artifactId>
+             <version>1.4</version>
+          </plugin>
+       </plugins>
+     </pluginManagement>
+   </build>
+  
+   <repositories>
+     <repository>
+       <id>jboss-public-repository-group</id>
+       <name>JBoss Public Maven Repository Group</name>
+       <url>http://repository.jboss.org/nexus/content/groups/public/</url>
+       <layout>default</layout>
+       <releases>
+         <enabled>true</enabled>
+         <updatePolicy>never</updatePolicy>
+       </releases>
+       <snapshots>
+         <enabled>true</enabled>
+         <updatePolicy>never</updatePolicy>
+       </snapshots>
+     </repository>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+
+    <repository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Snapshots Repository</name>
+      <layout>default</layout>
+      <url>http://snapshots.jboss.org/maven2/</url>
+      <snapshots>
+         <enabled>true</enabled>
+      </snapshots>
+      <releases>
+         <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+  
+  <dependencyManagement>
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>maven-war-plugin</artifactId>
+         <version>2.0.2</version>
+      </dependency>
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <version>4.4</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>apache-log4j</groupId>
+         <artifactId>log4j</artifactId>
+         <version>1.2.14</version>
+         <optional>true</optional>
+      </dependency>
+      <dependency>
+         <groupId>org.apache</groupId>
+         <artifactId>xmlsec</artifactId>
+         <version>1.4.3</version>
+         <optional>true</optional>
+      </dependency>
+      <dependency>
+         <groupId>apache-logging</groupId>
+         <artifactId>commons-logging-api</artifactId>
+         <version>1.0.3</version>
+         <optional>true</optional>
+      </dependency>
+      <dependency>
+         <groupId>javax.persistence</groupId>
+         <artifactId>persistence-api</artifactId>
+         <version>1.0</version>
+         <optional>true</optional>
+      </dependency>
+      <dependency>
+        <groupId>sun-jaxb</groupId>
+        <artifactId>jaxb-api</artifactId>
+        <version>2.1.9</version>
+        <optional>true</optional>
+      </dependency>
+      <dependency>
+        <groupId>sun-jaxb</groupId>
+        <artifactId>jaxb-impl</artifactId>
+        <version>2.1.9</version>
+         <optional>true</optional>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.security</groupId>
+         <artifactId>jbossxacml</artifactId>
+         <version>2.0.4</version>
+      </dependency>
+      <dependency>
+         <groupId>org.openid4java</groupId>
+         <artifactId>openid4java</artifactId>
+         <version>0.9.5</version>
+      </dependency>
+      <dependency>
+         <groupId>nekohtml</groupId>
+         <artifactId>nekohtml</artifactId>
+         <version>1.9.12</version>
+         <optional>true</optional>
+      </dependency>
+      <dependency>
+         <groupId>org.mortbay.jetty</groupId>
+         <artifactId>jetty</artifactId>
+         <version>6.1.18</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.mortbay.jetty</groupId>
+         <artifactId>jetty-util</artifactId>
+         <version>6.1.18</version>
+         <scope>test</scope>
+      </dependency>
+   </dependencies>
+  </dependencyManagement>
+
+</project>

Added: integation-tests/trunk/picketlink-saml-tests/ant-build.xml
===================================================================
--- integation-tests/trunk/picketlink-saml-tests/ant-build.xml	                        (rev 0)
+++ integation-tests/trunk/picketlink-saml-tests/ant-build.xml	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,96 @@
+<project default="init" name="PicketLink Federation Integration Test Suite">
+   <taskdef resource="net/sf/antcontrib/antlib.xml">
+     <classpath path="${depclasspath}"/>
+   </taskdef>
+   <property name="JBAS_DEPLOY" location="${basedir}/target/jboss-5.1.0.GA/server/default/deploy/" />
+   <property name="TOMCAT" location="${basedir}/target/apache-tomcat-6.0.26/" />
+   <property name="TOMCAT_DEPLOY" location="${basedir}/target/apache-tomcat-6.0.26/webapps/" />
+   <property name="TOMCAT_LIB" location="${basedir}/target/apache-tomcat-6.0.26/lib/" />
+   <property environment="env" />
+
+  <target name="init-jboss">
+    <!-- Unzip JBoss AS and Tomcat -->
+    <echo>Unzip JBOSS AS 5.1.0.GA</echo>
+    <unzip src="${basedir}/../common-dist/jbossas/5.1.0.GA/jboss-5.1.0.GA-jdk6.zip"
+           dest="${basedir}/target"/>
+  </target>
+  <target name="init-tomcat">
+    <echo>Unzip Apache Tomcat 6.0.26</echo>
+    <unzip src="${basedir}/../common-dist/tomcat/6.0.26/apache-tomcat-6.0.26.zip"
+           dest="${basedir}/target"/>
+  </target>
+
+
+  <target name="tomcat-thirdparty-deps" depends="init-tomcat" >
+    <copy file="${localRepository}/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" todir="${TOMCAT_LIB}"/>
+  </target>
+
+  <target name="copy-picketlink-tomcat" depends="tomcat-thirdparty-deps" >
+    <copy file="${localRepository}/org/picketlink/picketlink-bindings/${version}/picketlink-bindings-${version}.jar" todir="${TOMCAT_LIB}"/>
+    <copy file="${localRepository}/org/picketlink/picketlink-bindings-jboss/${version}/picketlink-bindings-jboss-${version}.jar" todir="${TOMCAT_LIB}"/>
+    <copy file="${localRepository}/org/picketlink/picketlink-fed/${version}/picketlink-fed-${version}.jar" todir="${TOMCAT_LIB}"/>
+
+    <unzip src="${localRepository}/org/picketlink/picketlink-fed-webapps-assembly/${version}/picketlink-fed-webapps-assembly-${version}.zip"
+           dest="${TOMCAT_DEPLOY}"/>
+
+     <move todir="${TOMCAT_DEPLOY}">
+        <fileset dir="${TOMCAT_DEPLOY}/picketlink">
+          <include name="**/*.war"/>
+        </fileset>
+     </move>
+
+     <copy file="${basedir}/../common-dist/tomcat/tomcat-users.xml"
+           todir="${TOMCAT}/conf" />
+     <copy file="${basedir}/../common-dist/tomcat/log4j.xml"
+           todir="${TOMCAT}/lib" />
+     <chmod dir="${basedir}/target/apache-tomcat-6.0.26/bin" perm="700" includes="**/*.sh"/>
+     <chmod dir="${basedir}/target/apache-tomcat-6.0.26/bin" perm="700" includes="**/*.jar"/>
+  </target>
+
+  <target name="copy-picketlink-jbas" depends="init-jboss" >
+    <mkdir dir="${basedir}/target/jboss-5.1.0.GA/server/default/deploy/picketlink" />
+    <copy file="${localRepository}/org/picketlink/picketlink-bindings/${version}/picketlink-bindings-${version}.jar" todir="${JBAS_DEPLOY}/picketlink"/>
+    <copy file="${localRepository}/org/picketlink/picketlink-bindings-jboss/${version}/picketlink-bindings-jboss-${version}.jar" todir="${JBAS_DEPLOY}/picketlink"/>
+    <copy file="${localRepository}/org/picketlink/picketlink-fed/${version}/picketlink-fed-${version}.jar" todir="${JBAS_DEPLOY}/picketlink"/>
+    <unzip src="${localRepository}/org/picketlink/picketlink-fed-webapps-assembly/${version}/picketlink-fed-webapps-assembly-${version}.zip"
+           dest="${JBAS_DEPLOY}"/>
+
+    <chmod file="${basedir}/target/jboss-5.1.0.GA/bin/run.sh" perm="700"/>
+  </target>
+
+  <target name="start-jboss" depends="copy-picketlink-jbas" >
+    <echo>Starting Local 8080 </echo>
+      <exec executable="${basedir}/target/jboss-5.1.0.GA/bin/run.sh" 
+            osfamily="unix" spawn="true" />
+         <waitfor maxwait="1" maxwaitunit="minute"
+              checkevery="100" checkeveryunit="millisecond">
+             <http url="http://localhost:8080" />
+     </waitfor>
+     <echo>:Local 8080 Started</echo> 
+  </target>
+
+  <target name="start-tomcat" depends="copy-picketlink-tomcat" >
+    <echo>Starting Local 8080 </echo>
+      <exec executable="${TOMCAT_DEPLOY}/../bin/startup.sh" 
+            osfamily="unix" spawn="true" />
+         <waitfor maxwait="25" maxwaitunit="second"
+              checkevery="100" checkeveryunit="millisecond">
+             <http url="http://localhost:8080" />
+     </waitfor>
+     <echo>:Local 8080 Started</echo> 
+  </target>
+
+  <target name="stop-jboss">
+    <echo>Stopping Local 8080 </echo>
+    <echo>Going to Kill the JBoss Process</echo>
+    <exec executable="${basedir}/../common-dist/scripts/stopjboss.sh" 
+          osfamily="unix" />
+  </target>
+
+  <target name="stop-tomcat">
+    <echo>Stopping Local 8080 </echo>
+    <echo>Going to stop tomcat</echo>
+    <exec executable="${TOMCAT_DEPLOY}/../bin/shutdown.sh" 
+          osfamily="unix" />
+  </target>
+</project>

Added: integation-tests/trunk/picketlink-saml-tests/pom.xml
===================================================================
--- integation-tests/trunk/picketlink-saml-tests/pom.xml	                        (rev 0)
+++ integation-tests/trunk/picketlink-saml-tests/pom.xml	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,184 @@
+<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">
+   <parent>
+      <groupId>org.picketlink</groupId>
+      <artifactId>picketlink-integration-tests-parent</artifactId>
+      <version>1.0.3.CR4-SNAPSHOT</version>
+      <relativePath>../parent</relativePath>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>picketlink-integration-saml-tests</artifactId>
+   <packaging>jar</packaging>
+   <name>PicketLink Integration Tests for SAML</name>
+   <url>http://labs.jboss.org/portal/picketlink/</url>
+   <description>PicketLink Federation Tests to be run in a continous integration environment such as Hudson</description>
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <properties>
+       <java.endorsed.dirs>${basedir}/src/test/resources/endorsed</java.endorsed.dirs>
+       <SERVICE_1_URL>http://localhost:8080/sales-post/</SERVICE_1_URL>
+       <SERVICE_2_URL>http://localhost:8080/employee-post/</SERVICE_2_URL>
+       <SERVICE_3_URL>http://localhost:8080/sales/</SERVICE_3_URL>
+       <SERVICE_4_URL>http://localhost:8080/employee/</SERVICE_4_URL>
+   </properties>
+   <build>
+     <plugins>
+       <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.4.3</version>
+          <configuration>
+            <phase>test</phase>
+           <!--  <skipTests>true</skipTests> -->
+            <printSummary>true</printSummary>
+            <disableXmlReport>false</disableXmlReport>
+            <testFailureIgnore>true</testFailureIgnore>
+            <includes>
+              <include>**/**TestCase.java</include>
+            </includes>
+            <forkMode>pertest</forkMode>
+            <argLine>-Djava.endorsed.dirs=${basedir}/src/test/resources/endorsed</argLine>
+            <useFile>false</useFile>
+            <trimStackTrace>false</trimStackTrace>
+           </configuration>
+           <executions>
+              <execution>
+                 <id>surefire-it</id>
+                 <phase>integration-test</phase>
+                 <goals>
+                    <goal>test</goal>
+                 </goals>
+                 <configuration>
+                    <skip>false</skip>
+                 </configuration>
+               </execution>
+             </executions>
+        </plugin>
+        <plugin>
+          <artifactId>maven-antrun-plugin</artifactId>
+          <executions>
+           <execution>
+             <id>phase-1</id>
+             <phase>compile</phase>
+             <configuration>
+                <tasks>
+                 <property name="depclasspath" refid="maven.dependency.classpath"/>
+                 <property name="version" value="${version}"/>
+                 <property name="localRepository" value="${user.home}/.m2/repository"/>
+                 <ant antfile="${basedir}/ant-build.xml" target="start-jboss" />
+                </tasks>
+             </configuration>
+             <goals>
+               <goal>run</goal>
+             </goals>
+            </execution>
+            <execution>
+             <id>phase-2</id>
+             <phase>test</phase>
+             <configuration>
+                <tasks>
+                 <property name="depclasspath" refid="maven.dependency.classpath"/>
+                 <property name="version" value="${version}"/>
+                 <property name="localRepository" value="${user.home}/.m2/repository"/>
+                 <ant antfile="${basedir}/ant-build.xml" target="stop-jboss" />
+                 <ant antfile="${basedir}/ant-build.xml" target="start-tomcat" />
+                </tasks>
+             </configuration>
+             <goals>
+               <goal>run</goal>
+             </goals>
+            </execution>
+            <execution>
+             <id>phase-3</id>
+             <phase>integration-test</phase>
+             <configuration>
+                <tasks>
+                 <property name="depclasspath" refid="maven.dependency.classpath"/>
+                 <property name="version" value="${version}"/>
+                 <property name="localRepository" value="${user.home}/.m2/repository"/>
+                 <ant antfile="${basedir}/ant-build.xml" target="stop-tomcat" />
+                </tasks>
+             </configuration>
+             <goals>
+               <goal>run</goal>
+             </goals>
+            </execution>
+          </executions>
+       </plugin>
+     </plugins>
+  </build>
+
+   <dependencies>
+      <dependency>
+         <groupId>junit</groupId>
+         <artifactId>junit</artifactId>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>httpunit</groupId>
+        <artifactId>httpunit</artifactId>
+        <version>1.7</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>rhino</groupId>
+        <artifactId>js</artifactId>
+        <version>1.6R7</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>nekohtml</groupId>
+        <artifactId>nekohtml</artifactId>
+        <version>1.9.12</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>apache-xerces</groupId>
+        <artifactId>xercesImpl</artifactId>
+        <version>2.9.1</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>ant-contrib</groupId>
+        <artifactId>ant-contrib</artifactId>
+        <version>1.0b2</version>
+      </dependency>
+
+   </dependencies>
+   
+   <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <doclet>org.jboss.apiviz.APIviz</doclet>
+          <docletArtifact>
+            <groupId>org.jboss.apiviz</groupId>
+            <artifactId>apiviz</artifactId>
+            <version>1.2.5.GA</version>
+          </docletArtifact>
+          <additionalparam>
+            -charset UTF-8
+            -docencoding UTF-8
+            -version
+            -author
+            -breakiterator
+            -windowtitle "${project.name} ${project.version} API Reference"
+            -doctitle "${project.name} ${project.version} API Reference"
+            -bottom "Copyright © ${project.inceptionYear}-Present ${project.organization.name}. All Rights Reserved."
+            -link http://java.sun.com/javase/6/docs/api/
+            -sourceclasspath ${project.build.outputDirectory}
+          </additionalparam>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Added: integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2MixedBindingGlobalLogOutUnitTestCase.java
===================================================================
--- integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2MixedBindingGlobalLogOutUnitTestCase.java	                        (rev 0)
+++ integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2MixedBindingGlobalLogOutUnitTestCase.java	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.test.integration.saml2;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.SubmitButton;
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebForm;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+
+/**
+ * <p>
+ *   Unit test the SAML2 Global Log Out scenarios.
+ * </p>
+ * <p>
+ *   <b>Note:</b> This test expects that a set of endpoints that are configured
+ *   for the test are available. You may have to start web containers offline
+ *   for the endpoints to be live.
+ * </p>
+ * 
+ * @author Anil.Saldhana at redhat.com
+ * @since Apr 8, 2010
+ */
+public class SAML2MixedBindingGlobalLogOutUnitTestCase
+{
+   String SERVICE_1_URL = System.getProperty( "SERVICE_1_URL", "http://localhost:8080/sales-post/" );
+   String SERVICE_2_URL = System.getProperty( "SERVICE_2_URL", "http://localhost:8080/employee-post/" );
+
+   String SERVICE_3_URL = System.getProperty( "SERVICE_3_URL", "http://localhost:8080/sales/" );
+   String SERVICE_4_URL = System.getProperty( "SERVICE_4_URL", "http://localhost:8080/employee/" );
+   
+   String LOGOUT_URL = "?GLO=true";
+   
+   @Test
+   public void testSAMLMixedBindingWithPostFirstGlobalLogOut() throws Exception
+   {
+      hitURLs(SERVICE_1_URL, SERVICE_2_URL, SERVICE_3_URL, SERVICE_4_URL);       
+   }
+   
+   @Test
+   public void testSAMLMixedBindingWithRedirectFirstGlobalLogOut() throws Exception
+   {
+      hitURLs(SERVICE_3_URL, SERVICE_4_URL, SERVICE_1_URL, SERVICE_2_URL); 
+   }
+   
+   
+   private void hitURLs( String url1, String url2, String url3, String url4 ) throws Exception
+   {
+      //Sales post Application Login
+      WebRequest serviceRequest1 = new GetMethodWebRequest( url1 );
+      WebConversation webConversation = new WebConversation();
+      
+      WebResponse webResponse = webConversation.getResponse( serviceRequest1 ); 
+      WebForm loginForm = webResponse.getForms()[0];
+      loginForm.setParameter("j_username", "tomcat" );
+      loginForm.setParameter("j_password", "tomcat" );
+      SubmitButton submitButton = loginForm.getSubmitButtons()[0];
+      submitButton.click(); 
+      
+      webResponse = webConversation.getCurrentPage();
+      assertTrue( " Reached the sales index page ", webResponse.getText().contains( "SalesTool" ));
+      
+      //Employee post Application Login
+      webResponse = webConversation.getResponse( url2 );
+      assertTrue( " Reached the employee index page ", webResponse.getText().contains( "EmployeeDashboard" ));
+      
+      //Sales Application Login
+      webResponse = webConversation.getResponse( url3 );
+      assertTrue( " Reached the employee index page ", webResponse.getText().contains( "SalesTool" ));
+      
+      //Employee Application Login
+      webResponse = webConversation.getResponse( url4 );
+      assertTrue( " Reached the employee index page ", webResponse.getText().contains( "EmployeeDashboard" ));
+      
+      //Logout from sales
+      webResponse = webConversation.getResponse( url1 + LOGOUT_URL ); 
+      assertTrue( "Reached logged out page", webResponse.getText().contains( "logged" ) );
+      
+      //Hit the Sales Apps again
+      webResponse = webConversation.getResponse( url1 );
+      assertTrue( " Reached the Login page ", webResponse.getText().contains( "Login" ));
+      webResponse = webConversation.getResponse( url3 );
+      assertTrue( " Reached the Login page ", webResponse.getText().contains( "Login" ));
+ 
+      //Hit the Employee Apps again
+      webResponse = webConversation.getResponse( url2 );
+      assertTrue( " Reached the Login page ", webResponse.getText().contains( "Login" )); 
+      webResponse = webConversation.getResponse( url2 );
+      assertTrue( " Reached the Login page ", webResponse.getText().contains( "Login" ));  
+   }
+}

Added: integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2PostBindingGlobalLogOutUnitTestCase.java
===================================================================
--- integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2PostBindingGlobalLogOutUnitTestCase.java	                        (rev 0)
+++ integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2PostBindingGlobalLogOutUnitTestCase.java	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.test.integration.saml2;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.SubmitButton;
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebForm;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+
+/**
+ * <p>
+ *   Unit test the SAML2 Global Log Out scenarios.
+ * </p>
+ * <p>
+ *   <b>Note:</b> This test expects that a set of endpoints that are configured
+ *   for the test are available. You may have to start web containers offline
+ *   for the endpoints to be live.
+ * </p>
+ * 
+ * @author Anil.Saldhana at redhat.com
+ * @since Apr 8, 2010
+ */
+public class SAML2PostBindingGlobalLogOutUnitTestCase
+{
+   @Test
+   public void testSAMLPostBindingGlobalLogOut() throws Exception
+   {
+      String SERVICE_1_URL = System.getProperty( "SERVICE_1_URL", "http://localhost:8080/sales-post/" );
+      String SERVICE_2_URL = System.getProperty( "SERVICE_2_URL", "http://localhost:8080/employee-post/" );
+      String LOGOUT_URL = "?GLO=true";
+      
+      //Sales Application Login
+      WebRequest serviceRequest1 = new GetMethodWebRequest( SERVICE_1_URL );
+      WebConversation webConversation = new WebConversation();
+      
+      WebResponse webResponse = webConversation.getResponse( serviceRequest1 ); 
+      WebForm loginForm = webResponse.getForms()[0];
+      loginForm.setParameter("j_username", "tomcat" );
+      loginForm.setParameter("j_password", "tomcat" );
+      SubmitButton submitButton = loginForm.getSubmitButtons()[0];
+      submitButton.click(); 
+      
+      webResponse = webConversation.getCurrentPage();
+      assertTrue( " Reached the sales index page ", webResponse.getText().contains( "SalesTool" ));
+      
+      //Employee Application Login
+      webResponse = webConversation.getResponse( SERVICE_2_URL );
+      assertTrue( " Reached the employee index page ", webResponse.getText().contains( "EmployeeDashboard" ));
+      
+      //Logout from sales
+      webResponse = webConversation.getResponse( SERVICE_1_URL + LOGOUT_URL ); 
+      assertTrue( "Reached logged out page", webResponse.getText().contains( "logged" ) );
+      
+      //Hit the Sales App again
+      webResponse = webConversation.getResponse( SERVICE_1_URL );
+      assertTrue( " Reached the Login page ", webResponse.getText().contains( "Login" ));
+ 
+      //Hit the Employee App again
+      webResponse = webConversation.getResponse( SERVICE_2_URL );
+      assertTrue( " Reached the Login page ", webResponse.getText().contains( "Login" ));     
+   }
+}

Added: integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2RedirectBindingGlobalLogOutUnitTestCase.java
===================================================================
--- integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2RedirectBindingGlobalLogOutUnitTestCase.java	                        (rev 0)
+++ integation-tests/trunk/picketlink-saml-tests/src/test/java/org/picketlink/test/integration/saml2/SAML2RedirectBindingGlobalLogOutUnitTestCase.java	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors. 
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.test.integration.saml2;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.SubmitButton;
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebForm;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+
+/**
+ * <p>
+ *   Unit test the SAML2 Global Log Out scenarios.
+ * </p>
+ * <p>
+ *   <b>Note:</b> This test expects that a set of endpoints that are configured
+ *   for the test are available. You may have to start web containers offline
+ *   for the endpoints to be live.
+ * </p>
+ * 
+ * @author Anil.Saldhana at redhat.com
+ * @since Apr 8, 2010
+ */
+public class SAML2RedirectBindingGlobalLogOutUnitTestCase
+{
+
+   String SERVICE_1_URL = System.getProperty( "SERVICE_3_URL", "http://localhost:8080/sales/" );
+   String SERVICE_2_URL = System.getProperty( "SERVICE_4_URL", "http://localhost:8080/employee/" );
+   
+   @Test
+   public void testSAMLRedirectBindingGLO() throws Exception
+   {
+      String LOGOUT_URL = "?GLO=true";
+      
+      //Sales Application Login
+      WebRequest serviceRequest1 = new GetMethodWebRequest( SERVICE_1_URL );
+      WebConversation webConversation = new WebConversation();
+      
+      WebResponse webResponse = webConversation.getResponse( serviceRequest1 ); 
+      WebForm loginForm = webResponse.getForms()[0];
+      loginForm.setParameter("j_username", "tomcat" );
+      loginForm.setParameter("j_password", "tomcat" );
+      SubmitButton submitButton = loginForm.getSubmitButtons()[0];
+      submitButton.click(); 
+      
+      webResponse = webConversation.getCurrentPage();
+      assertTrue( " Reached the sales index page ", webResponse.getText().contains( "SalesTool" ));
+      
+      //Employee Application Login
+      webResponse = webConversation.getResponse( SERVICE_2_URL );
+      assertTrue( " Reached the employee index page ", webResponse.getText().contains( "EmployeeDashboard" ));
+      
+      //Logout from sales
+      webResponse = webConversation.getResponse( SERVICE_1_URL + LOGOUT_URL ); 
+      assertTrue( "Reached logged out page", webResponse.getText().contains( "logged" ) );
+      
+      //Hit the Sales App again
+      webResponse = webConversation.getResponse( SERVICE_1_URL );
+      assertTrue( " Reached the Login page ", webResponse.getText().contains( "Login" ));
+ 
+      //Hit the Employee App again
+      webResponse = webConversation.getResponse( SERVICE_2_URL );
+      assertTrue( " Reached the Login page ", webResponse.getText().contains( "Login" ));     
+   }
+}

Added: integation-tests/trunk/pom.xml
===================================================================
--- integation-tests/trunk/pom.xml	                        (rev 0)
+++ integation-tests/trunk/pom.xml	2010-06-04 19:55:40 UTC (rev 279)
@@ -0,0 +1,20 @@
+<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">
+   <parent>
+      <groupId>org.picketlink</groupId>
+      <artifactId>picketlink-integration-tests-parent</artifactId>
+      <version>1.0.3.CR4-SNAPSHOT</version>
+      <relativePath>parent</relativePath>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+   <groupId>org.picketlink</groupId>
+   <artifactId>picketlink-integration-tests-pom</artifactId>
+   <packaging>pom</packaging>
+   <name>PicketLink Integration Tests- Aggregator</name>
+   <url>http://jboss.org/picketlink/</url>
+   <description>PicketLink is the identity project for Java projects</description>
+
+   <modules>
+     <module>parent</module>
+     <module>picketlink-saml-tests</module>
+   </modules>
+</project>



More information about the picketlink-commits mailing list