directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject [directory-studio] branch master updated: Fix tests, message from LDAP API changed
Date Sun, 20 May 2018 09:58:24 GMT
This is an automated email from the ASF dual-hosted git repository.

seelmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-studio.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c6586c  Fix tests, message from LDAP API changed
3c6586c is described below

commit 3c6586c480318801268cd261fc784a6cef68639f
Author: Stefan Seelmann <mail@stefan-seelmann.de>
AuthorDate: Sun May 20 11:58:16 2018 +0200

    Fix tests, message from LDAP API changed
---
 .../integration/ui/CertificateValidationTest.java  | 27 +++++++++++-----------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
index 9de9172..7105da0 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/CertificateValidationTest.java
@@ -476,12 +476,8 @@ public class CertificateValidationTest
         assertFalse( trustDialogBot.isHostNameMismatch() );
         assertFalse( trustDialogBot.isIssuerUnkown() );
         trustDialogBot.selectDontTrust();
-        ErrorDialogBot errorBot = trustDialogBot.clickOkButtonExpectingErrorDialog();
-        // LDAP API: SSL handshake failed
-        // JNDI: Untrusted certificate
-        assertThat( errorBot.getErrorMessage(),
-            anyOf( containsString( "SSL handshake failed" ), containsString( "Untrusted certificate"
) ) );
-        errorBot.clickOkButton();
+
+        clickOkButtonExpectingCertficateErrorDialog( trustDialogBot );
 
         wizardBot.clickCancelButton();
     }
@@ -521,6 +517,15 @@ public class CertificateValidationTest
         assertFalse( trustDialogBot.isHostNameMismatch() );
         assertFalse( trustDialogBot.isIssuerUnkown() );
         trustDialogBot.selectDontTrust();
+
+        clickOkButtonExpectingCertficateErrorDialog( trustDialogBot );
+
+        wizardBot.clickCancelButton();
+    }
+
+
+    private void clickOkButtonExpectingCertficateErrorDialog( CertificateTrustDialogBot trustDialogBot
)
+    {
         ErrorDialogBot errorBot = trustDialogBot.clickOkButtonExpectingErrorDialog();
         // LDAP API: Failed to initialize the SSL context, root cause: TLS handshake failed
         // JNDI: Untrusted certificate
@@ -528,8 +533,6 @@ public class CertificateValidationTest
             anyOf( containsString( "Failed to initialize the SSL context" ), containsString(
"TLS handshake failed" ),
                 containsString( "Untrusted certificate" ) ) );
         errorBot.clickOkButton();
-
-        wizardBot.clickCancelButton();
     }
 
 
@@ -569,12 +572,8 @@ public class CertificateValidationTest
         assertFalse( trustDialogBot.isNotYetValid() );
         assertFalse( trustDialogBot.isExpired() );
         trustDialogBot.selectDontTrust();
-        ErrorDialogBot errorBot = trustDialogBot.clickOkButtonExpectingErrorDialog();
-        // LDAP API: SSL handshake failed
-        // JNDI: Untrusted certificate
-        assertThat( errorBot.getErrorMessage(),
-            anyOf( containsString( "SSL handshake failed" ), containsString( "Untrusted certificate"
) ) );
-        errorBot.clickOkButton();
+
+        clickOkButtonExpectingCertficateErrorDialog( trustDialogBot );
 
         wizardBot.clickCancelButton();
     }

-- 
To stop receiving notification emails like this one, please contact
seelmann@apache.org.

Mime
View raw message