[java-identity-provider COMMIT] in /trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl: InitializeReque...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Feb 3 21:28:21 EST 2014
Author: scantor
Date: Mon Feb 3 21:28:20 2014
New Revision: 5308
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5308&view=rev
Log:
Fix failing tests.
Modified:
trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/InitializeRequestedPrincipalContextTest.java
trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateRemoteUserTest.java
Modified: trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/InitializeRequestedPrincipalContextTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/InitializeRequestedPrincipalContextTest.java?rev=5308&r1=5307&r2=5308&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/InitializeRequestedPrincipalContextTest.java (original)
+++ trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/InitializeRequestedPrincipalContextTest.java Mon Feb 3 21:28:20 2014
@@ -111,6 +111,7 @@
new MockAuthenticationProfileConfiguration("mock", Collections.singletonList(method));
src = new RequestContextBuilder().setRelyingPartyProfileConfigurations(
Collections.<ProfileConfiguration>singleton(mock)).buildRequestContext();
+ prc = new WebflowRequestContextProfileRequestContextLookup().apply(src);
AuthenticationContext authCtx = prc.getSubcontext(AuthenticationContext.class, true);
final Event event = action.execute(src);
Modified: trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateRemoteUserTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateRemoteUserTest.java?rev=5308&r1=5307&r2=5308&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateRemoteUserTest.java (original)
+++ trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateRemoteUserTest.java Mon Feb 3 21:28:20 2014
@@ -20,6 +20,8 @@
import java.util.Arrays;
import java.util.regex.Pattern;
+
+import javax.servlet.http.HttpServletRequest;
import net.shibboleth.idp.authn.AuthnEventIds;
import net.shibboleth.idp.authn.context.AuthenticationContext;
@@ -47,7 +49,7 @@
action.setWhitelistedUsernames(Arrays.asList("bar", "baz"));
action.setBlacklistedUsernames(Arrays.asList("foo"));
action.setMatchExpression(Pattern.compile("^ba(r|z|n)$"));
- action.setHttpServletRequest(new MockHttpServletRequest());
+ action.setHttpServletRequest((HttpServletRequest) src.getExternalContext().getNativeRequest());
action.initialize();
}
@@ -63,7 +65,7 @@
}
@Test public void testMissingUser2() throws Exception {
- AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
+ final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
ac.setAttemptedFlow(authenticationFlows.get(0));
doExtract(prc);
@@ -75,7 +77,7 @@
@Test public void testUnauthorized() throws Exception {
((MockHttpServletRequest) action.getHttpServletRequest()).setRemoteUser("bam");
- AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
+ final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
ac.setAttemptedFlow(authenticationFlows.get(0));
doExtract(prc);
@@ -87,7 +89,7 @@
@Test public void testAuthorized() throws Exception {
((MockHttpServletRequest) action.getHttpServletRequest()).setRemoteUser("baz");
- AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
+ final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
ac.setAttemptedFlow(authenticationFlows.get(0));
doExtract(prc);
@@ -102,7 +104,7 @@
@Test public void testBlacklist() throws Exception {
((MockHttpServletRequest) action.getHttpServletRequest()).setRemoteUser("foo");
- AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
+ final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
ac.setAttemptedFlow(authenticationFlows.get(0));
doExtract(prc);
@@ -114,7 +116,7 @@
@Test public void testPattern() throws Exception {
((MockHttpServletRequest) action.getHttpServletRequest()).setRemoteUser("ban");
- AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
+ final AuthenticationContext ac = prc.getSubcontext(AuthenticationContext.class, false);
ac.setAttemptedFlow(authenticationFlows.get(0));
doExtract(prc);
@@ -127,9 +129,9 @@
}
[... 10 lines stripped ...]
More information about the commits
mailing list