[java-idp-integration-tests] 02/04: IDP-2409 - Enable test when global consent is not allowed

Codeberg noreply at shibboleth.net
Fri Dec 5 16:52:49 UTC 2025


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

codeberg pushed a commit to branch main
in repository java-idp-integration-tests.

View the commit online:
https://codeberg.org/Shibboleth/java-idp-integration-tests/commit/b68792f587bd88c86017e43be9be0674f37af15a

commit b68792f587bd88c86017e43be9be0674f37af15a
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Tue Dec 2 18:56:57 2025 -0600

    IDP-2409 - Enable test when global consent is not allowed
    
    https://shibboleth.atlassian.net/browse/IDP-2409
---
 .../tests/consent/PassiveConsentTest.java          | 34 ++++++++++++++++++----
 1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/src/test/java/net/shibboleth/idp/integration/tests/consent/PassiveConsentTest.java b/src/test/java/net/shibboleth/idp/integration/tests/consent/PassiveConsentTest.java
index dca2022..c1f48c4 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/consent/PassiveConsentTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/consent/PassiveConsentTest.java
@@ -166,15 +166,14 @@ public class PassiveConsentTest extends AbstractSAML2IntegrationTest {
         }
     }
 
-    @Test
-    @LinuxOnly
+
     /**
      * Test consent with isPassive=true and global consent allowed (the default).
      * 
      * @throws Exception
      *             if an error occurs
      */
-    public void testIdP2409() throws Exception {
+    protected void testIdP2409() throws Exception {
 
         // Start SP
 
@@ -218,15 +217,30 @@ public class PassiveConsentTest extends AbstractSAML2IntegrationTest {
         driver.get(startFlowURL + "&isPassive=true");
 
         sleep(1000);
+    }
+
+    @Test
+    @LinuxOnly
+    /**
+     * Test consent with isPassive=true and global consent allowed.
+     * 
+     * @throws Exception
+     *             if an error occurs
+     */
+    public void testIdP2409AllowGlobalTrue() throws Exception {
 
-        // should see NoPassive error
+        // Explicitly allow global consent (allowed by default)
+
+        replaceIdPProperty("idp.consent.allowGlobal", "true");
+
+        testIdP2409();
 
         waitForPageBodyContains("Status: urn:oasis:names:tc:SAML:2.0:status:Requester");
         waitForPageBodyContains("Sub-Status: urn:oasis:names:tc:SAML:2.0:status:NoPassive");
         waitForPageBodyContains("Message: An error occurred");
     }
 
-    @Test(enabled = false)
+    @Test
     @LinuxOnly
     /**
      * Test consent with isPassive=true and global consent not allowed.
@@ -241,6 +255,16 @@ public class PassiveConsentTest extends AbstractSAML2IntegrationTest {
         replaceIdPProperty("idp.consent.allowGlobal", "false");
 
         testIdP2409();
+
+        if (isIdPVersionBefore("5.2.0-SNAPSHOT")) {
+            // should see attribute release page before IdP version 5.2.0
+            waitForAttributeReleasePage();
+        } else {
+            // should see NoPassive error for IdP version 5.2.0 and later
+            waitForPageBodyContains("Status: urn:oasis:names:tc:SAML:2.0:status:Requester");
+            waitForPageBodyContains("Sub-Status: urn:oasis:names:tc:SAML:2.0:status:NoPassive");
+            waitForPageBodyContains("Message: An error occurred");
+        }
     }
 
 }

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


More information about the commits mailing list