[java-idp-integration-tests] 02/03: JOIDC-147 - Add more OP Conformance tests

Tom Zeller tzeller at dragonacea.biz
Fri Aug 30 02:10:08 UTC 2024


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

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

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=383767442f8567472faef5b6a127a56ffe5b9b6a

commit 383767442f8567472faef5b6a127a56ffe5b9b6a
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Thu Aug 29 18:07:23 2024 -0500

    JOIDC-147 - Add more OP Conformance tests
    
    Add more tests and handle expected failure
    
    https://shibboleth.atlassian.net/browse/JOIDC-147
---
 .../tests/oidc/ConformanceSuiteContainer.java      | 10 ++-
 .../integration/tests/oidc/OPConformanceTest.java  | 98 ++++++++++++++++++++++
 2 files changed, 107 insertions(+), 1 deletion(-)

diff --git a/src/test/java/net/shibboleth/idp/integration/tests/oidc/ConformanceSuiteContainer.java b/src/test/java/net/shibboleth/idp/integration/tests/oidc/ConformanceSuiteContainer.java
index fdf4fb4..f6c90ed 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/oidc/ConformanceSuiteContainer.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/oidc/ConformanceSuiteContainer.java
@@ -466,7 +466,7 @@ public class ConformanceSuiteContainer extends AbstractIdentifiableInitializable
     /**
      * Whether test was successful or not.
      * 
-     * Tests need to run to completion with no failures or warnings.
+     * Tests need to run to completion with no unexpected failures or warnings.
      * 
      * @param output
      *            test plan output
@@ -480,6 +480,10 @@ public class ConformanceSuiteContainer extends AbstractIdentifiableInitializable
             success = false;
         }
 
+        if (output.contains("Exiting with failure")) {
+            success = false;
+        }
+
         final Pattern pattern = Pattern.compile(
                 "Overall totals: ran (\\d+) test modules. Conditions: (\\d+) successes, (\\d+) failures, (\\d+) warnings\\.");
 
@@ -500,6 +504,10 @@ public class ConformanceSuiteContainer extends AbstractIdentifiableInitializable
 
         if (!failures.equals("0")) {
             success = false;
+            if (output.contains("All tests ran to completion.") && output.contains("Expected failure")) {
+                log.debug("Test has expected failure");
+                success = true;
+            }
         }
 
         if (!warnings.equals("0")) {
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/oidc/OPConformanceTest.java b/src/test/java/net/shibboleth/idp/integration/tests/oidc/OPConformanceTest.java
index f035691..f8ce0b7 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/oidc/OPConformanceTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/oidc/OPConformanceTest.java
@@ -270,6 +270,104 @@ public class OPConformanceTest extends BaseOPTest {
         conformanceSuite.runTest(description, testPlan);
     }
 
+    @Test
+    @IdPV5OrLater
+    @LinuxOnly
+    @OPConformance
+    public void testDynamicCertificationProfileAuthorizationCode () throws Exception {
+
+        final String description = "dynamic certification profile authorization code test";
+
+        final String testPlan = //
+                "scripts/run-test-plan.py --verbose " + //
+                "--expected-skips-file skip-oidcc-idtoken-unsigned.json " + //
+                "--expected-failures-file skip-oidcc-server-rotate-keys.json " + //
+                "'oidcc-dynamic-certification-test-plan[response_type=code]' testop-config.json";
+
+        conformanceSuite.runTest(description, testPlan);
+    }
+
+    @Test
+    @IdPV5OrLater
+    @LinuxOnly
+    @OPConformance
+    public void testDynamicCertificationProfileAuthorizationIdToken () throws Exception {
+
+        final String description = "dynamic certification profile authorization id_token test";
+
+        final String testPlan = //
+                "scripts/run-test-plan.py --verbose " + //
+                "--expected-failures-file skip-oidcc-server-rotate-keys.json " + //
+                "'oidcc-dynamic-certification-test-plan[response_type=id_token]' testop-config.json";
+
+        conformanceSuite.runTest(description, testPlan);
+    }
+
+    @Test
+    @IdPV5OrLater
+    @LinuxOnly
+    @OPConformance
+    public void testDynamicCertificationProfileAuthorizationIdTokenToken () throws Exception {
+
+        final String description = "dynamic certification profile authorization id_token token test";
+
+        final String testPlan = //
+                "scripts/run-test-plan.py --verbose " + //
+                "--expected-failures-file skip-oidcc-server-rotate-keys.json " + //
+                "'oidcc-dynamic-certification-test-plan[response_type=id_token token]' testop-config.json";
+
+        conformanceSuite.runTest(description, testPlan);
+    }
+
+    @Test
+    @IdPV5OrLater
+    @LinuxOnly
+    @OPConformance
+    public void testDynamicCertificationProfileAuthorizationCodeIdToken () throws Exception {
+
+        final String description = "dynamic certification profile authorization code id_token test";
+
+        final String testPlan = //
+                "scripts/run-test-plan.py --verbose " + //
+                "--expected-failures-file skip-oidcc-server-rotate-keys.json " + //
+                "'oidcc-dynamic-certification-test-plan[response_type=code id_token]' testop-config.json";
+
+        conformanceSuite.runTest(description, testPlan);
+    }
+
+    @Test
+    @IdPV5OrLater
+    @LinuxOnly
+    @OPConformance
+    public void testDynamicCertificationProfileAuthorizationCodeToken () throws Exception {
+
+        final String description = "dynamic certification profile authorization code token test";
+
+        final String testPlan = //
+                "scripts/run-test-plan.py --verbose " + //
+                "--expected-skips-file skip-oidcc-idtoken-unsigned.json " + //
+                "--expected-failures-file skip-oidcc-server-rotate-keys.json " + //
+                "'oidcc-dynamic-certification-test-plan[response_type=code token]' testop-config.json";
+
+        conformanceSuite.runTest(description, testPlan);
+    }
+
+    @Test
+    @IdPV5OrLater
+    @LinuxOnly
+    @OPConformance
+    public void testDynamicCertificationProfileAuthorizationCodeIdTokenToken () throws Exception {
+
+        final String description = "dynamic certification profile authorization code id_token token test";
+
+        final String testPlan = //
+                "scripts/run-test-plan.py --verbose " + //
+                "--expected-failures-file skip-oidcc-server-rotate-keys.json " + //
+                "'oidcc-dynamic-certification-test-plan[response_type=code id_token token]' testop-config.json";
+
+        conformanceSuite.runTest(description, testPlan);
+    }
+
     /**
      * Do not stop browser after each test.
      */

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


More information about the commits mailing list