You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2017/06/13 11:23:02 UTC

[3/4] syncope git commit: Ensuring SAML2ITCase is disabled when running tests without SAML support

Ensuring SAML2ITCase is disabled when running tests without SAML support


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3ad2ef76
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3ad2ef76
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3ad2ef76

Branch: refs/heads/2_0_X
Commit: 3ad2ef76d5787bae38ebf9ab5c752b7a72c157f6
Parents: ae947c7
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Jun 13 12:57:48 2017 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Jun 13 12:57:48 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/syncope/fit/core/SAML2ITCase.java   | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/3ad2ef76/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java
index ece9e6c..6e4cbca 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SAML2ITCase.java
@@ -63,7 +63,9 @@ public class SAML2ITCase extends AbstractITCase {
 
     @BeforeClass
     public static void importFromIdPMetadata() {
-        Assume.assumeTrue(SAML2SPDetector.isSAML2SPAvailable());
+        if (!SAML2SPDetector.isSAML2SPAvailable()) {
+            return;
+        }
 
         assertTrue(saml2IdPService.list().isEmpty());
 
@@ -86,7 +88,9 @@ public class SAML2ITCase extends AbstractITCase {
 
     @AfterClass
     public static void clearIdPs() {
-        Assume.assumeTrue(SAML2SPDetector.isSAML2SPAvailable());
+        if (!SAML2SPDetector.isSAML2SPAvailable()) {
+            return;
+        }
 
         for (SAML2IdPTO idp : saml2IdPService.list()) {
             saml2IdPService.delete(idp.getKey());
@@ -115,6 +119,8 @@ public class SAML2ITCase extends AbstractITCase {
 
     @Test
     public void createLoginRequest() {
+        Assume.assumeTrue(SAML2SPDetector.isSAML2SPAvailable());
+
         SAML2RequestTO loginRequest = anonymous.getService(SAML2SPService.class).
                 createLoginRequest(ADDRESS, "https://idp.testshib.org/idp/shibboleth");
         assertNotNull(loginRequest);
@@ -127,6 +133,8 @@ public class SAML2ITCase extends AbstractITCase {
 
     @Test
     public void setIdPMapping() {
+        Assume.assumeTrue(SAML2SPDetector.isSAML2SPAvailable());
+
         SAML2IdPTO ssoCircle = IterableUtils.find(saml2IdPService.list(), new Predicate<SAML2IdPTO>() {
 
             @Override