[java-identity-provider COMMIT] in /trunk/idp-attribute-filter-spring/src/test: java/net/shibboleth/idp/attribute/fil...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Nov 25 12:53:45 EST 2014
Author: rdw
Date: Tue Nov 25 12:53:44 2014
New Revision: 7012
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7012&view=rev
Log:
Widen scripted filter tests
Added:
trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/matcher/scripted-V8.xml (with props)
trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/file.v8.script
trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/scripted-v8.xml (with props)
Modified:
trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/basic/ScriptedTest.java
trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/scripted.xml
Modified: trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/basic/ScriptedTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/basic/ScriptedTest.java?rev=7012&r1=7011&r2=7012&view=diff
==============================================================================
--- trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/basic/ScriptedTest.java (original)
+++ trunk/idp-attribute-filter-spring/src/test/java/net/shibboleth/idp/attribute/filter/spring/basic/ScriptedTest.java Tue Nov 25 12:53:44 2014
@@ -46,6 +46,13 @@
final String ver = System.getProperty("java.version");
return ver.startsWith("1.8");
}
+
+ private String getScript() {
+ if (isV8()) {
+ return "scripted-v8.xml";
+ }
+ return "scripted.xml";
+ }
@BeforeClass public void setupAttributes() throws ComponentInitializationException, ResolutionException {
@@ -54,9 +61,9 @@
@Test public void policy() throws ComponentInitializationException {
if (isV8()) {
- return;
+ //return;
}
- final ScriptedPolicyRule rule = (ScriptedPolicyRule) getPolicyRule("scripted.xml");
+ final ScriptedPolicyRule rule = (ScriptedPolicyRule) getPolicyRule(getScript());
AttributeFilterContext filterContext = new AttributeFilterContext();
filterContext.setPrefilteredIdPAttributes(epaUid.values());
@@ -64,17 +71,15 @@
}
@Test(expectedExceptions={BeanCreationException.class,}) public void policyNotFound() throws ComponentInitializationException {
- if (isV8()) {
- throw new BeanCreationException("test");
- }
+
getPolicyRule("scriptedNotThere.xml");
}
@Test public void matcher() throws ComponentInitializationException {
if (isV8()) {
- return;
+ // return;
}
- final ScriptedMatcher matcher = (ScriptedMatcher) getMatcher("scripted.xml");
+ final ScriptedMatcher matcher = (ScriptedMatcher) getMatcher(getScript());
AttributeFilterContext filterContext = new AttributeFilterContext();
filterContext.setPrefilteredIdPAttributes(epaUid.values());
Modified: trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/scripted.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/scripted.xml?rev=7012&r1=7011&r2=7012&view=diff
==============================================================================
--- trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/scripted.xml (original)
+++ trunk/idp-attribute-filter-spring/src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/scripted.xml Tue Nov 25 12:53:44 2014
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:mace:shibboleth:2.0:afp http://shibboleth.net/schema/idp/shibboleth-afp.xsd
urn:mace:shibboleth:2.0:afp:mf:basic http://shibboleth.net/schema/idp/shibboleth-afp-mf-basic.xsd">
- <afp:PolicyRequirementRule xsi:type="basic:Script">
+ <afp:PolicyRequirementRule xsi:type="basic:Script" language="JavaScript">
<basic:ScriptFile>src/test/resources/net/shibboleth/idp/attribute/filter/policyrule/file.script</basic:ScriptFile>
</afp:PolicyRequirementRule>
</afp:AttributeFilterPolicy>
More information about the commits
mailing list