cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1346956 - in /cxf/trunk/services/sts/systests: advanced/src/test/java/org/apache/cxf/systest/sts/common/ basic/ basic/src/test/java/org/apache/cxf/systest/sts/common/ basic/src/test/java/org/apache/cxf/systest/sts/username_actas/ basic/src...
Date Wed, 06 Jun 2012 15:51:19 GMT
Author: coheigea
Date: Wed Jun  6 15:51:18 2012
New Revision: 1346956

URL: http://svn.apache.org/viewvc?rev=1346956&view=rev
Log:
Switching to forkmode once for the STS basic systests

Modified:
    cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
    cxf/trunk/services/sts/systests/basic/pom.xml
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
    cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
    cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
    cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml

Modified: cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java?rev=1346956&r1=1346955&r2=1346956&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
(original)
+++ cxf/trunk/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
Wed Jun  6 15:51:18 2012
@@ -32,13 +32,14 @@ public final class SecurityTestUtil {
     public static void cleanup() {
         String tmpDir = System.getProperty("java.io.tmpdir");
         if (tmpDir != null) {
-            File nonceFile = new File(tmpDir + File.separator + "ws-security.nonce.cache.instance.data");
-            if (nonceFile.exists()) {
-                nonceFile.delete();
-            }
-            File tsFile = new File(tmpDir + File.separator + "ws-security.timestamp.cache.instance.data");
-            if (tsFile.exists()) {
-                tsFile.delete();
+            File[] tmpFiles = new File(tmpDir).listFiles();
+            if (tmpFiles != null) {
+                for (File tmpFile : tmpFiles) {
+                    if (tmpFile.exists() && (tmpFile.getName().startsWith("ws-security.nonce.cache.instance")
+                            || tmpFile.getName().startsWith("ws-security.timestamp.cache.instance")))
{
+                        tmpFile.delete();
+                    }
+                }
             }
         }
     }

Modified: cxf/trunk/services/sts/systests/basic/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/pom.xml?rev=1346956&r1=1346955&r2=1346956&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/pom.xml (original)
+++ cxf/trunk/services/sts/systests/basic/pom.xml Wed Jun  6 15:51:18 2012
@@ -146,10 +146,6 @@
         </plugins>
     </build>
     
-   <properties>
-        <cxf.surefire.fork.mode>pertest</cxf.surefire.fork.mode>
-   </properties>
-    
    <profiles>
         <profile>
             <id>standalone</id>

Modified: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java?rev=1346956&r1=1346955&r2=1346956&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/SecurityTestUtil.java
Wed Jun  6 15:51:18 2012
@@ -32,13 +32,14 @@ public final class SecurityTestUtil {
     public static void cleanup() {
         String tmpDir = System.getProperty("java.io.tmpdir");
         if (tmpDir != null) {
-            File nonceFile = new File(tmpDir + File.separator + "ws-security.nonce.cache.instance.data");
-            if (nonceFile.exists()) {
-                nonceFile.delete();
-            }
-            File tsFile = new File(tmpDir + File.separator + "ws-security.timestamp.cache.instance.data");
-            if (tsFile.exists()) {
-                tsFile.delete();
+            File[] tmpFiles = new File(tmpDir).listFiles();
+            if (tmpFiles != null) {
+                for (File tmpFile : tmpFiles) {
+                    if (tmpFile.exists() && (tmpFile.getName().startsWith("ws-security.nonce.cache.instance")
+                            || tmpFile.getName().startsWith("ws-security.timestamp.cache.instance")))
{
+                        tmpFile.delete();
+                    }
+                }
             }
         }
     }

Modified: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java?rev=1346956&r1=1346955&r2=1346956&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
Wed Jun  6 15:51:18 2012
@@ -171,7 +171,7 @@ public class UsernameActAsTest extends A
         
         // Change the STSClient so that it can no longer find the STS
         STSClient stsClient = new STSClient(bus);
-        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+        stsClient.setActAs(new WSSUsernameCallbackHandler());
         BindingProvider p = (BindingProvider)bearerPort;
         p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
         
@@ -190,7 +190,7 @@ public class UsernameActAsTest extends A
         
         // Change the STSClient so that it can no longer find the STS
         stsClient = new STSClient(bus);
-        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+        stsClient.setActAs(new WSSUsernameCallbackHandler());
         p = (BindingProvider)bearerPort2;
         p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
         
@@ -274,7 +274,7 @@ public class UsernameActAsTest extends A
         
         // Change the STSClient so that it can no longer find the STS
         STSClient stsClient = new STSClient(bus);
-        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+        stsClient.setActAs(new WSSUsernameCallbackHandler());
         BindingProvider p = (BindingProvider)bearerPort;
         p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
         
@@ -366,7 +366,7 @@ public class UsernameActAsTest extends A
         
         // Change the STSClient so that it can no longer find the STS
         STSClient stsClient = new STSClient(bus);
-        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+        stsClient.setActAs(new WSSUsernameCallbackHandler());
         p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
         
         // Make a successful invocation - should work as token is cached
@@ -448,7 +448,7 @@ public class UsernameActAsTest extends A
         
         // Change the STSClient so that it can no longer find the STS
         stsClient = new STSClient(bus);
-        stsClient.setOnBehalfOf(new WSSUsernameCallbackHandler());
+        stsClient.setActAs(new WSSUsernameCallbackHandler());
         stsClient.setEnableAppliesTo(false);
         p.getRequestContext().put(SecurityConstants.STS_CLIENT, stsClient);
         

Modified: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java?rev=1346956&r1=1346955&r2=1346956&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
Wed Jun  6 15:51:18 2012
@@ -99,7 +99,7 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
         DoubleItPortType bearerPort = 
             service.getPort(portQName, DoubleItPortType.class);
         updateAddressPort(bearerPort, PORT);
@@ -152,7 +152,7 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
         
         //
         // Proxy no. 1
@@ -247,7 +247,7 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
         
         DoubleItPortType bearerPort = 
             service.getPort(portQName, DoubleItPortType.class);
@@ -343,7 +343,7 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
         
         DoubleItPortType bearerPort = 
             service.getPort(portQName, DoubleItPortType.class);
@@ -440,7 +440,7 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
         
         DoubleItPortType bearerPort = 
             service.getPort(portQName, DoubleItPortType.class);

Modified: cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl?rev=1346956&r1=1346955&r2=1346956&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
Wed Jun  6 15:51:18 2012
@@ -46,10 +46,10 @@
 	</wsdl:binding>
 
 	<wsdl:service name="DoubleItService">
-		<wsdl:port name="DoubleItAsymmetricSAML2BearerPort" 
+		<wsdl:port name="DoubleItOBOAsymmetricSAML2BearerPort" 
 		           binding="tns:DoubleItAsymmetricSAML2BearerBinding">
 			<soap:address
-				location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearer" />
+				location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearerobo" />
 		</wsdl:port>
 	</wsdl:service>
 	

Modified: cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml?rev=1346956&r1=1346955&r2=1346956&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
Wed Jun  6 15:51:18 2012
@@ -37,7 +37,7 @@ http://cxf.apache.org/configuration/secu
     
     <bean id="delegationCallbackHandler" class="org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler"
/>
    
-   <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2BearerPort"

+   <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItOBOAsymmetricSAML2BearerPort"

                   createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>

Modified: cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml?rev=1346956&r1=1346955&r2=1346956&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
Wed Jun  6 15:51:18 2012
@@ -41,9 +41,9 @@
     
    <jaxws:endpoint id="doubleitasymmetricsaml2bearer"
       implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
-      endpointName="s:DoubleItAsymmetricSAML2BearerPort"
+      endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort"
       serviceName="s:DoubleItService"
-      address="http://localhost:${testutil.ports.Server}/doubleit/services/doubleitasymmetricsaml2bearer"
+      address="http://localhost:${testutil.ports.Server}/doubleit/services/doubleitasymmetricsaml2bearerobo"
       wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl"
       xmlns:s="http://www.example.org/contract/DoubleIt">
         



Mime
View raw message