You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2016/11/16 22:23:23 UTC

svn commit: r1770067 - in /directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui: GssApiTest.java bots/ApacheDSConfigurationEditorBot.java

Author: seelmann
Date: Wed Nov 16 22:23:23 2016
New Revision: 1770067

URL: http://svn.apache.org/viewvc?rev=1770067&view=rev
Log:
Skip GSSAPI test if no default realm is defined

Modified:
    directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/GssApiTest.java
    directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/GssApiTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/GssApiTest.java?rev=1770067&r1=1770066&r2=1770067&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/GssApiTest.java (original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/GssApiTest.java Wed Nov 16 22:23:23 2016
@@ -44,7 +44,7 @@ import org.apache.directory.studio.test.
 import org.apache.directory.studio.test.integration.ui.bots.utils.FrameworkRunnerWithScreenshotCaptureListener;
 import org.eclipse.core.runtime.Platform;
 import org.junit.After;
-import org.junit.AfterClass;
+import org.junit.Assume;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -52,6 +52,8 @@ import org.junit.Test;
 import org.junit.rules.TestName;
 import org.junit.runner.RunWith;
 
+import sun.security.krb5.Config;
+
 
 /**
  * Tests secure connection handling.
@@ -87,13 +89,6 @@ public class GssApiTest
     }
 
 
-    @AfterClass
-    public static void tearDownClass() throws Exception
-    {
-        deleteServer( serverName );
-    }
-
-
     @Before
     public void setUp() throws Exception
     {
@@ -124,6 +119,15 @@ public class GssApiTest
         // create the server
         createServer( serverName );
 
+        try
+        {
+            Config.getInstance().getDefaultRealm();
+        }
+        catch ( Exception e )
+        {
+            Assume.assumeNoException( "Skipping tests as not default realm (/etc/krb5.conf) is configured", e );
+        }
+
         // configure ApacheDS and KDC server
         configureApacheDS( serverName );
 
@@ -161,6 +165,8 @@ public class GssApiTest
         assertNull( "Expected OK", result );
 
         wizardBot.clickCancelButton();
+
+        deleteServer( serverName );
     }
 
 

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java?rev=1770067&r1=1770066&r2=1770067&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java (original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ApacheDSConfigurationEditorBot.java Wed Nov 16 22:23:23 2016
@@ -24,6 +24,7 @@ import org.apache.mina.util.AvailablePor
 import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotMultiPageEditor;
 import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
 
 
 public class ApacheDSConfigurationEditorBot
@@ -99,6 +100,13 @@ public class ApacheDSConfigurationEditor
     }
 
 
+    public void setLdapAddress( String address )
+    {
+        activateLdapLdapsServersPage();
+        editor.bot().text( 1 ).setText( address );
+    }
+
+
     public boolean isLdapsServerEnabled()
     {
         activateLdapLdapsServersPage();
@@ -120,6 +128,13 @@ public class ApacheDSConfigurationEditor
     }
 
 
+    public void setLdapsAddress( String address )
+    {
+        activateLdapLdapsServersPage();
+        editor.bot().text( 5 ).setText( address );
+    }
+
+
     public void setKeystore( String keyStoreFilePath, String keyStorePassword )
     {
         activateLdapLdapsServersPage();
@@ -170,6 +185,13 @@ public class ApacheDSConfigurationEditor
     }
 
 
+    public void setKerberosAddress( String address )
+    {
+        activateKerberosServerPage();
+        editor.bot().text( 1 ).setText( address );
+    }
+
+
     public int getKerberosPort()
     {
         activateKerberosServerPage();
@@ -191,6 +213,21 @@ public class ApacheDSConfigurationEditor
     }
 
 
+    public void setRequirePreAuthenticationByEncryptedTimestamp( boolean enable )
+    {
+        activateKerberosServerPage();
+        SWTBotCheckBox checkBox = editor.bot().checkBox( 5 );
+        if ( enable )
+        {
+            checkBox.select();
+        }
+        else
+        {
+            checkBox.deselect();
+        }
+    }
+
+
     public void save()
     {
         editor.save();