[java-idp-integration-tests] 03/03: Do not use secure port when using Safari
Tom Zeller
tzeller at dragonacea.biz
Thu Jun 24 20:29:04 UTC 2021
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=cd3f599c03d0477a17eb2e3f84ab3ba9e57fbef7
commit cd3f599c03d0477a17eb2e3f84ab3ba9e57fbef7
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Thu Jun 24 15:28:48 2021 -0500
Do not use secure port when using Safari
---
.../saml1/SAML1UnsolicitedSSOIntegrationTest.java | 18 ++++++++++++++----
.../saml2/SAML2UnsolicitedSSOIntegrationTest.java | 20 +++++++++++++++++---
2 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/src/test/java/net/shibboleth/idp/test/saml1/SAML1UnsolicitedSSOIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml1/SAML1UnsolicitedSSOIntegrationTest.java
index cadc621..c97e41f 100644
--- a/src/test/java/net/shibboleth/idp/test/saml1/SAML1UnsolicitedSSOIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml1/SAML1UnsolicitedSSOIntegrationTest.java
@@ -22,7 +22,6 @@ import javax.annotation.Nullable;
import net.shibboleth.idp.test.BrowserData;
-import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/**
@@ -42,8 +41,18 @@ public class SAML1UnsolicitedSSOIntegrationTest extends AbstractSAML1Integration
/** Target. */
@Nonnull public final String target = "MyRelayState";
- @BeforeClass(dependsOnMethods = {"setUpEndpoints"})
- public void setUpURLs() throws Exception {
+ /**
+ * Set up URLs.
+ *
+ * Do not use secure URLs if browser is Safari.
+ *
+ * @param browserData platform/browser/version triplet
+ */
+ public void setUpURLs(@Nullable final BrowserData browserData) {
+
+ if (isSafari(browserData)) {
+ useSecureBaseURL = false;
+ }
final String shire = getBaseURL() + shirePath;
@@ -57,11 +66,12 @@ public class SAML1UnsolicitedSSOIntegrationTest extends AbstractSAML1Integration
/**
* Test SAML 1 unsolicited SSO.
*
- * @param browserData browser/os/version triplet provided by data provider
+ * @param browserData platform/browser/version triplet provided by data provider
* @throws Exception if an error occurs
*/
@Test(dataProvider = "sauceOnDemandBrowserDataProvider")
public void testSAML1UnsolicitedSSO(@Nullable final BrowserData browserData) throws Exception {
+ setUpURLs(browserData);
super.testSSO(browserData);
}
}
diff --git a/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationTest.java
index a8b4d87..d6294b3 100644
--- a/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml2/SAML2UnsolicitedSSOIntegrationTest.java
@@ -22,7 +22,6 @@ import javax.annotation.Nullable;
import net.shibboleth.idp.test.BrowserData;
-import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/** SAML 2 unsolicited SSO test. */
@@ -40,8 +39,18 @@ public class SAML2UnsolicitedSSOIntegrationTest extends AbstractSAML2Integration
/** Target. */
@Nonnull public final String target = "MyRelayState";
- @BeforeClass(dependsOnMethods = {"setUpEndpoints"})
- public void setUpURLs() throws Exception {
+ /**
+ * Set up URLs.
+ *
+ * Do not use secure URLs if browser is Safari.
+ *
+ * @param browserData platform/browser/version triplet
+ */
+ public void setUpURLs(@Nullable final BrowserData browserData) throws Exception {
+
+ if (isSafari(browserData)) {
+ useSecureBaseURL = false;
+ }
final String shire = getBaseURL() + shirePath;
@@ -54,26 +63,31 @@ public class SAML2UnsolicitedSSOIntegrationTest extends AbstractSAML2Integration
@Test(dataProvider = "sauceOnDemandBrowserDataProvider")
public void testSSOReleaseAllAttributes(@Nullable final BrowserData browserData) throws Exception {
+ setUpURLs(browserData);
super.testSSOReleaseAllAttributes(browserData);
}
@Test(dataProvider = "sauceOnDemandBrowserDataProvider")
public void testSSOReleaseOneAttribute(@Nullable final BrowserData browserData) throws Exception {
+ setUpURLs(browserData);
super.testSSOReleaseOneAttribute(browserData);
}
@Test(dataProvider = "sauceOnDemandBrowserDataProvider")
public void testSSODoNotRememberConsent(@Nullable final BrowserData browserData) throws Exception {
+ setUpURLs(browserData);
super.testSSODoNotRememberConsent(browserData);
}
@Test(dataProvider = "sauceOnDemandBrowserDataProvider")
public void testSSOGlobalConsent(@Nullable final BrowserData browserData) throws Exception {
+ setUpURLs(browserData);
super.testSSOGlobalConsent(browserData);
}
@Test(dataProvider = "sauceOnDemandBrowserDataProvider")
public void testSSOTermsOfUse(@Nullable final BrowserData browserData) throws Exception {
+ setUpURLs(browserData);
super.testSSOTermsOfUse(browserData);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list