[java-plugin-shibd-saml] branch main updated: Remove extraneous test from action unit test.

Scott Cantor cantor.2 at osu.edu
Wed Sep 24 02:09:13 UTC 2025


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

scantor pushed a commit to branch main
in repository java-plugin-shibd-saml.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd-saml.git;a=commit;h=2fd2a726bc25e3ee919046c48fa8a89189ced3a1

The following commit(s) were added to refs/heads/main by this push:
     new 2fd2a72  Remove extraneous test from action unit test.
2fd2a72 is described below

commit 2fd2a726bc25e3ee919046c48fa8a89189ced3a1
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Sep 23 22:09:06 2025 -0400

    Remove extraneous test from action unit test.
---
 .../profile/impl/PrepareAgentResponseTest.java     | 53 ----------------------
 1 file changed, 53 deletions(-)

diff --git a/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java b/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java
index 5be2247..81814db 100644
--- a/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java
+++ b/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java
@@ -26,14 +26,11 @@ import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.UnmarshallingException;
 import org.opensaml.core.xml.util.XMLObjectSupport;
 import org.opensaml.profile.action.EventIds;
-import org.opensaml.saml.common.binding.SAMLBindingSupport;
 import org.opensaml.saml.saml2.core.Assertion;
 import org.opensaml.saml.saml2.core.AuthnStatement;
 import org.opensaml.saml.saml2.core.NameID;
 import org.opensaml.saml.saml2.core.Subject;
 import org.opensaml.saml.saml2.testing.SAML2ActionTestingSupport;
-import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.mock.web.MockHttpServletResponse;
 import org.springframework.webflow.execution.Event;
 import org.testng.Assert;
 import org.testng.annotations.AfterMethod;
@@ -53,13 +50,9 @@ import net.shibboleth.shared.codec.DecodingException;
 import net.shibboleth.shared.codec.EncodingException;
 import net.shibboleth.shared.collection.CollectionSupport;
 import net.shibboleth.shared.component.ComponentInitializationException;
-import net.shibboleth.shared.net.CookieManager;
-import net.shibboleth.shared.net.CookieManager.SameSiteValue;
-import net.shibboleth.shared.primitive.NonnullSupplier;
 import net.shibboleth.shared.xml.XMLParserException;
 import net.shibboleth.shared.xml.impl.BasicParserPool;
 import net.shibboleth.sp.ddf.DDF;
-import net.shibboleth.sp.impl.CookieStateTokenManager;
 import net.shibboleth.sp.messaging.RemotedHttpServletResponse;
 import net.shibboleth.sp.profile.ConsumerConstants;
 import net.shibboleth.sp.profile.impl.BaseAgplicationActionTest;
@@ -174,52 +167,6 @@ public class PrepareAgentResponseTest extends BaseAgplicationActionTest {
         }
     }
 
-    /**
-     * Unit test for RelayState.
-     * 
-     * @throws ComponentInitializationException 
-     * @throws IOException 
-     */
-    @Test
-    public void testRelayState() throws ComponentInitializationException, IOException {
-
-        final MockHttpServletRequest request = new MockHttpServletRequest();
-        final MockHttpServletResponse response = new MockHttpServletResponse();
-        
-        final CookieManager cookieManager = new CookieManager();
-        cookieManager.setSameSite(SameSiteValue.None);
-        cookieManager.setHttpServletRequestSupplier(NonnullSupplier.of(request));
-        cookieManager.setHttpServletResponseSupplier(NonnullSupplier.of(response));
-        cookieManager.initialize();
-        
-        final CookieStateTokenManager manager = new CookieStateTokenManager();
-        manager.setId("test");
-        manager.setCookieManager(cookieManager);
-        manager.initialize();
-        
-        application.setStateTokenManager(manager);
-        application.initialize();
-        
-        final String state = manager.preserveToStateToken(agent, application, TEST_URL.getBytes(StandardCharsets.UTF_8));
-        request.setCookies(response.getCookies());
-        
-        SAMLBindingSupport.setRelayState(prc.ensureInboundMessageContext(), state);
-        
-        final Event event = action.execute(src);
-        ActionTestingSupport.assertProceedEvent(event);
-        
-        final DDF out = arc.getOutput();
-        assert out != null;
-        Assert.assertTrue(out.isstruct());
-        Assert.assertTrue(out.getmember("session").isnull());
-        
-        final DDF http = out.getmember(RemotedHttpServletResponse.STRUCTURE_NAME);
-        Assert.assertTrue(http.isstruct());
-        Assert.assertEquals(http.getmember("redirect").unsafe_string(), TEST_URL.getBytes(StandardCharsets.UTF_8));
-        Assert.assertTrue(http.getmember("response").isnull());
-        Assert.assertTrue(http.getmember("headers").isnull());
-    }
-
     /**
      * Unit test for getting attributes serialized into output.
      * 

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


More information about the commits mailing list