[java-idp-integration-tests] 02/02: Enable OIDC SSO test

Tom Zeller tzeller at dragonacea.biz
Sat Mar 2 16:20:15 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=1fcf3ba7e63bace4e3da25562d3779ec318b4f25

commit 1fcf3ba7e63bace4e3da25562d3779ec318b4f25
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Sat Mar 2 10:19:54 2024 -0600

    Enable OIDC SSO test
    
    Only on Linux with Jetty
    
    https://shibboleth.atlassian.net/browse/IDP-2243
---
 .../idp/integration/tests/BaseIntegrationTest.java           | 11 ++++++++++-
 .../net/shibboleth/idp/integration/tests/oidc/OIDCTest.java  | 12 +++++++++---
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
index 1fa764e..f0241d7 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
@@ -3129,7 +3129,7 @@ public abstract class BaseIntegrationTest {
      * @throws IOException
      *             if an error occurs
      */
-    protected void enableJettyModule(@Nonnull final String module) throws IOException {
+    public void enableJettyModule(@Nonnull final String module) throws IOException {
 
         // Path to Java, either idp.java.home or java.home system property
         final String javaHome = System.getProperty("idp.java.home", System.getProperty("java.home"));
@@ -3167,4 +3167,13 @@ public abstract class BaseIntegrationTest {
         logProcess(process, "Install Jetty '" + module + "' module :");
     }
 
+    /**
+     * Return true if 'tomcat' system property is 'true'.
+     * 
+     * @return true if 'tomcat' system property is 'true'
+     */
+    public static boolean isTomcat() {
+        return Boolean.getBoolean("tomcat");
+    }
+
 }
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/oidc/OIDCTest.java b/src/test/java/net/shibboleth/idp/integration/tests/oidc/OIDCTest.java
index 0771630..26be4a5 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/oidc/OIDCTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/oidc/OIDCTest.java
@@ -56,7 +56,7 @@ public class OIDCTest extends BaseIntegrationTest {
     protected final List<RPContainer> rps = new ArrayList<>();
 
     @BeforeClass
-    public void setUpURLs() throws Exception {
+    protected void setUpURLs() throws Exception {
 
         loginPageURLPath = "/idp/profile/oidc/authorize";
 
@@ -460,9 +460,15 @@ public class OIDCTest extends BaseIntegrationTest {
         Assert.assertTrue(response.contains(expectedIssuer), "Expected issuer not found");
     }
 
-    @Test(dataProvider = "sauceOnDemandBrowserDataProvider", enabled = false)
+    @Test(dataProvider = "sauceOnDemandBrowserDataProvider", enabled = true)
     public void testSSO(@Nullable final BrowserData browserData) throws Exception {
 
+        // Only run on Linux with Jetty
+        if (isWindows() || isTomcat()) {
+            log.debug("Skipping OIDC test, only runs on Linux with Jetty");
+            return;
+        }
+
         // Install OIDC OP plugin
         final String[] plugins = new String[] { //
                 "net.shibboleth.oidc.common", //
@@ -554,7 +560,7 @@ public class OIDCTest extends BaseIntegrationTest {
      * Stop all RPs.
      */
     @AfterMethod()
-    public void stopRPs() {
+    protected void stopRPs() {
         for (final RPContainer rp : rps) {
             if (rp != null && rp.isRunning()) {
                 rp.stop();

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


More information about the commits mailing list