cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [4/6] cxf-fediz git commit: Removing unnecessary test
Date Fri, 04 Nov 2016 15:27:01 GMT
Removing unnecessary test


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/5f0dee1e
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/5f0dee1e
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/5f0dee1e

Branch: refs/heads/master
Commit: 5f0dee1e23e4ea3e1813e8662829d895f3d8424b
Parents: 7b20eb7
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Nov 4 11:49:10 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Nov 4 11:49:10 2016 +0000

----------------------------------------------------------------------
 .../cxf/fediz/integrationtests/WSFedTest.java   | 42 --------------------
 1 file changed, 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/5f0dee1e/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
----------------------------------------------------------------------
diff --git a/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
b/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
index 1bc296e..8821ecb 100644
--- a/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
+++ b/systests/federation/wsfed/src/test/java/org/apache/cxf/fediz/integrationtests/WSFedTest.java
@@ -28,10 +28,6 @@ import java.util.ArrayList;
 
 import javax.servlet.ServletException;
 
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
 import com.gargoylesoftware.htmlunit.CookieManager;
 import com.gargoylesoftware.htmlunit.HttpMethod;
 import com.gargoylesoftware.htmlunit.WebClient;
@@ -42,7 +38,6 @@ import com.gargoylesoftware.htmlunit.html.HtmlForm;
 import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
 import com.gargoylesoftware.htmlunit.util.NameValuePair;
-import com.gargoylesoftware.htmlunit.xml.XmlPage;
 
 import org.apache.catalina.Context;
 import org.apache.catalina.LifecycleException;
@@ -50,16 +45,12 @@ import org.apache.catalina.LifecycleState;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.cxf.fediz.core.ClaimTypes;
-import org.apache.cxf.fediz.core.util.DOMUtils;
 import org.apache.cxf.fediz.tomcat7.FederationAuthenticator;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.xml.security.keys.KeyInfo;
-import org.apache.xml.security.signature.XMLSignature;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
-import org.junit.Test;
 
 /**
  * This is a test for federation using a WS-Federation enabled web application. The web application
is configured
@@ -367,39 +358,6 @@ public class WSFedTest {
                           bodyTextContent.contains(claim + "=alice@realma.org"));
     }
     
-    @Test
-    public void testSAMLSSOIdPServiceMetadata() throws Exception {
-        String url = "https://localhost:" + getIdpHttpsPort()
-            + "/fediz-idp/metadata/urn:org:apache:cxf:fediz:idp:realm-B";
-
-        final WebClient webClient = new WebClient();
-        webClient.getOptions().setUseInsecureSSL(true);
-        webClient.getOptions().setSSLClientCertificate(
-            this.getClass().getClassLoader().getResource("client.jks"), "storepass", "jks");
-
-        final XmlPage rpPage = webClient.getPage(url);
-        final String xmlContent = rpPage.asXml();
-        Assert.assertTrue(xmlContent.startsWith("<md:EntityDescriptor"));
-
-        // Now validate the Signature
-        Document doc = rpPage.getXmlDocument();
-
-        doc.getDocumentElement().setIdAttributeNS(null, "ID", true);
-
-        Node signatureNode =
-            DOMUtils.getChild(doc.getDocumentElement(), "Signature");
-        Assert.assertNotNull(signatureNode);
-
-        XMLSignature signature = new XMLSignature((Element)signatureNode, "");
-        KeyInfo ki = signature.getKeyInfo();
-        Assert.assertNotNull(ki);
-        Assert.assertNotNull(ki.getX509Certificate());
-
-        Assert.assertTrue(signature.checkSignatureValue(ki.getX509Certificate()));
-
-        webClient.close();
-    }
-    
     @org.junit.Test
     public void testOIDC() throws Exception {
         String url = "https://localhost:" + getRpHttpsPort() + "/oidc/secure/fedservlet";


Mime
View raw message