[java-identity-provider] branch master updated: Fix test in light of newer Velocity behavior.
Scott Cantor
cantor.2 at osu.edu
Wed Jan 23 13:52:56 EST 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=a51e6098cb94ed5245bc3bb5bd4c941099e62e18
The following commit(s) were added to refs/heads/master by this push:
new a51e609 Fix test in light of newer Velocity behavior.
a51e609 is described below
commit a51e6098cb94ed5245bc3bb5bd4c941099e62e18
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Jan 23 13:52:54 2019 -0500
Fix test in light of newer Velocity behavior.
---
.../attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java
index 4fde4a7..e983d09 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/ldap/impl/LDAPDataConnectorTest.java
@@ -21,6 +21,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Properties;
import javax.annotation.Nonnull;
@@ -280,7 +281,12 @@ public class LDAPDataConnectorTest {
@Test(expectedExceptions={ResolutionException.class}) public void resolveTemplateExcept() throws ComponentInitializationException, ResolutionException {
final TemplatedExecutableSearchFilterBuilder builder = new TemplatedExecutableSearchFilterBuilder();
builder.setTemplateText("(uid=${resolutionContext.AttributeRecipientID.toString().substring(99, 106)})");
- builder.setVelocityEngine(VelocityEngine.newVelocityEngine());
+ final Properties props = new Properties();
+ // TODO, should expose a way to set the strict prop underneath
+ props.setProperty("runtime.references.strict", "true");
+ props.setProperty("string.resource.loader.class", "org.apache.velocity.runtime.resource.loader.StringResourceLoader");
+ props.setProperty("resource.loader", "classpath, string");
+ builder.setVelocityEngine(VelocityEngine.newVelocityEngine(props));
builder.initialize();
resolve(builder);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list