[java-idp-integration-tests] branch master updated: Update CAS test to handle incorrect V3 and correct V4 scoped attribute

Tom Zeller tzeller at dragonacea.biz
Wed Jan 29 14:24:42 EST 2020


This is an automated email from the git hooks/post-receive script.

tzeller pushed a commit to branch master
in repository java-idp-integration-tests.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=a864370afdf90cf674ef12b6321430ca6d96be8b

The following commit(s) were added to refs/heads/master by this push:
       new  a864370   Update CAS test to handle incorrect V3 and correct V4 scoped attribute
a864370 is described below

commit a864370afdf90cf674ef12b6321430ca6d96be8b
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Wed Jan 29 13:24:32 2020 -0600

    Update CAS test to handle incorrect V3 and correct V4 scoped attribute
    
    https://issues.shibboleth.net/jira/browse/IDP-1446
---
 .../net/shibboleth/idp/test/cas/CASIntegrationTest.java   | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/test/java/net/shibboleth/idp/test/cas/CASIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/cas/CASIntegrationTest.java
index 91e19fc..fa49702 100644
--- a/src/test/java/net/shibboleth/idp/test/cas/CASIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/cas/CASIntegrationTest.java
@@ -49,11 +49,18 @@ public class CASIntegrationTest extends BaseIntegrationTest {
     @Nonnull final String expectedCASServiceResponse = "<cas:serviceresponse xmlns:cas=\"http://www.yale.edu/tp/cas\">"
             + "<cas:authenticationsuccess><cas:user>jdoe</cas:user></cas:authenticationsuccess></cas:serviceresponse>";
     
+    /** Expected, but incorrect, CAS service response with attributes for IdP V3. */
+    @Nonnull final String expectedCASServiceResponseWithAttributesV3 =
+            "<cas:serviceresponse xmlns:cas=\"http://www.yale.edu/tp/cas\"><cas:authenticationsuccess>"
+                    + "<cas:user>jdoe</cas:user><cas:attributes>"
+                    + "<cas:edupersonscopedaffiliation>member</cas:edupersonscopedaffiliation>"
+                    + "</cas:attributes></cas:authenticationsuccess></cas:serviceresponse>";
+
     /** Expected CAS service response with attributes. */
     @Nonnull final String expectedCASServiceResponseWithAttributes =
             "<cas:serviceresponse xmlns:cas=\"http://www.yale.edu/tp/cas\"><cas:authenticationsuccess>"
                     + "<cas:user>jdoe</cas:user><cas:attributes>"
-                    + "<cas:edupersonscopedaffiliation>member</cas:edupersonscopedaffiliation>"
+                    + "<cas:edupersonscopedaffiliation>member at example.org</cas:edupersonscopedaffiliation>"
                     + "</cas:attributes></cas:authenticationsuccess></cas:serviceresponse>";
 
     @BeforeClass
@@ -150,7 +157,11 @@ public class CASIntegrationTest extends BaseIntegrationTest {
 
         final String actualCASServiceResponse = getCASServiceResponse(driver.getPageSource());
 
-        Assert.assertEquals(actualCASServiceResponse, expectedCASServiceResponseWithAttributes);
+        if (idpVersion.startsWith("3")) {
+            Assert.assertEquals(actualCASServiceResponse, expectedCASServiceResponseWithAttributesV3);
+        } else {
+            Assert.assertEquals(actualCASServiceResponse, expectedCASServiceResponseWithAttributes);
+        }
     }
 
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list