[java-identity-provider] branch feature/IDP-1434 updated: IDP-1434 Fix and enable mapping flow tests

Rod Widdowson rdw at steadingsoftware.com
Thu May 9 11:40:02 EDT 2019


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

rdw pushed a commit to branch feature/IDP-1434
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=cdcd58a181e9af8bce28af40c67e35fa41d05daf

The following commit(s) were added to refs/heads/feature/IDP-1434 by this push:
       new  cdcd58a   IDP-1434 Fix and enable mapping flow tests
cdcd58a is described below

commit cdcd58a181e9af8bce28af40c67e35fa41d05daf
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu May 9 16:39:08 2019 +0100

    IDP-1434 Fix and enable mapping flow tests
    
    https://issues.shibboleth.net/jira/browse/IDP-1434
    
    "just" consists of configuiring the mapping service with the legacy attribute resolver files
---
 .../java/net/shibboleth/idp/test/flows/mapper/MappingTest.java    | 2 +-
 .../net/shibboleth/idp/test/flows/mapper/TestAfterFilter.java     | 8 ++++----
 idp-conf/src/test/resources/mapping/configs/attribute-filter.xml  | 2 +-
 .../src/test/resources/mapping/configs/attribute-resolver.xml     | 2 --
 idp-conf/src/test/resources/mapping/configs/override.xml          | 5 +++++
 5 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/mapper/MappingTest.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/mapper/MappingTest.java
index e4d892c..4c0c74e 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/mapper/MappingTest.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/mapper/MappingTest.java
@@ -28,7 +28,7 @@ import org.testng.annotations.Test;
  */
 @ContextConfiguration({"classpath:/mapping/configs/override.xml", })
 public class MappingTest extends AbstractFlowTest {
-    @Test(enabled=false) public void testResolveAndFilter() {
+    @Test(enabled=true) public void testResolveAndFilter() {
 
         final FlowExecutionResult result = flowExecutor.launchExecution("resolveAndFilter", null, externalContext);
 
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/mapper/TestAfterFilter.java b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/mapper/TestAfterFilter.java
index b6db71f..4bd9ed5 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/flows/mapper/TestAfterFilter.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/flows/mapper/TestAfterFilter.java
@@ -39,13 +39,13 @@ public class TestAfterFilter extends AbstractProfileAction {
         
         AttributeContext ac = rpc.getSubcontext(AttributeContext.class);
         
-        Assert.assertNotNull(ac.getIdPAttributes().get("IdPRA1"));
-        Assert.assertFalse(ac.getIdPAttributes().get("IdPRA1").getValues().isEmpty());
+        Assert.assertNull(ac.getIdPAttributes().get("IdPNotOK"));
         Assert.assertNull(ac.getIdPAttributes().get("IdPEA1"));
         
         Assert.assertNotNull(ac.getIdPAttributes().get("IdPOK"));
         Assert.assertFalse(ac.getIdPAttributes().get("IdPOK").getValues().isEmpty());
-        Assert.assertNull(ac.getIdPAttributes().get("IdPNotOK"));
-                
+
+        Assert.assertNotNull(ac.getIdPAttributes().get("IdPRA1"));
+        Assert.assertFalse(ac.getIdPAttributes().get("IdPRA1").getValues().isEmpty());
     }
 }
diff --git a/idp-conf/src/test/resources/mapping/configs/attribute-filter.xml b/idp-conf/src/test/resources/mapping/configs/attribute-filter.xml
index c690913..0d9edc7 100644
--- a/idp-conf/src/test/resources/mapping/configs/attribute-filter.xml
+++ b/idp-conf/src/test/resources/mapping/configs/attribute-filter.xml
@@ -28,7 +28,7 @@
     </AttributeFilterPolicy>
 	
 
-    <!--  Release is EA map -->
+    <!--  Release if EA map -->
 	<AttributeFilterPolicy id="EAOKFILTER">
 		<PolicyRequirementRule id="prrEA1" xsi:type="EntityAttributeExactMatch"
             attributeName="http://macedir.org/entity-category"
diff --git a/idp-conf/src/test/resources/mapping/configs/attribute-resolver.xml b/idp-conf/src/test/resources/mapping/configs/attribute-resolver.xml
index ec1cdf5..6acdcfd 100644
--- a/idp-conf/src/test/resources/mapping/configs/attribute-resolver.xml
+++ b/idp-conf/src/test/resources/mapping/configs/attribute-resolver.xml
@@ -17,7 +17,6 @@ Part 1 of a two part attribute resolver.
         <AttributeEncoder xsi:type="SAML2String" name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1" friendlyName="eduPersonAffiliation" />
     </AttributeDefinition>
 
-
     <DataConnector id="staticAttributes" xsi:type="Static">
         <Attribute id="ra_1">
             <Value>RA1</Value>
@@ -46,5 +45,4 @@ Part 1 of a two part attribute resolver.
             name="http://example.org/result"
             nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" friendlyName="OKOUT" />
     </AttributeDefinition>
-    
 </AttributeResolver>
diff --git a/idp-conf/src/test/resources/mapping/configs/override.xml b/idp-conf/src/test/resources/mapping/configs/override.xml
index aa47df8..2c0a499 100644
--- a/idp-conf/src/test/resources/mapping/configs/override.xml
+++ b/idp-conf/src/test/resources/mapping/configs/override.xml
@@ -18,4 +18,9 @@
         <value>classpath:/mapping/configs/attribute-filter2.xml</value>
 	</util:list>
 
+	<util:list id ="shibboleth.AttributeRegistryResources">
+        <value>classpath:/system/conf/attribute-registry-system.xml</value>
+        <value>classpath:/mapping/configs/attribute-resolver.xml</value>
+        <value>classpath:/mapping/configs/attribute-resolver2.xml</value>
+    </util:list>
 </beans>
\ No newline at end of file

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


More information about the commits mailing list