directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1723789 - in /directory/studio/trunk/tests: test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/ test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/ test.integration.ui/src/m...
Date Fri, 08 Jan 2016 20:16:24 GMT
Author: seelmann
Date: Fri Jan  8 20:16:24 2016
New Revision: 1723789

URL: http://svn.apache.org/viewvc?rev=1723789&view=rev
Log:
Fix tests on Jenkins

Added:
    directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Constants.java
  (with props)
    directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/Constants.java
  (with props)
Modified:
    directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java
    directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java
    directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java
    directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java

Added: directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Constants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Constants.java?rev=1723789&view=auto
==============================================================================
--- directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Constants.java
(added)
+++ directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Constants.java
Fri Jan  8 20:16:24 2016
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.test.integration.core;
+
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+
+public final class Constants
+{
+    public static final String LOCALHOST = getLocalHost();
+
+
+    private static String getLocalHost()
+    {
+        try
+        {
+            return InetAddress.getLocalHost().getHostName();
+        }
+        catch ( UnknownHostException e )
+        {
+            return "localhost";
+        }
+    }
+
+}

Propchange: directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java?rev=1723789&r1=1723788&r2=1723789&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java
(original)
+++ directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/DirectoryApiConnectionWrapperTest.java
Fri Jan  8 20:16:24 2016
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.test.integration.core;
 
 
+import static org.apache.directory.studio.test.integration.core.Constants.LOCALHOST;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -72,8 +73,7 @@ import org.junit.runner.RunWith;
  */
 @RunWith(FrameworkRunner.class)
 @CreateLdapServer(transports =
-    { @CreateTransport(address = "0.0.0.0", protocol = "LDAP"),
-        @CreateTransport(address = "0.0.0.0", protocol = "LDAPS") })
+    { @CreateTransport(protocol = "LDAP"), @CreateTransport(protocol = "LDAPS") })
 public class DirectoryApiConnectionWrapperTest extends AbstractLdapTestUnit
 {
 
@@ -84,7 +84,7 @@ public class DirectoryApiConnectionWrapp
     public void testConnect()
     {
         StudioProgressMonitor monitor = getProgressMonitor();
-        ConnectionParameter connectionParameter = new ConnectionParameter( null, "localhost",
ldapServer.getPort(),
+        ConnectionParameter connectionParameter = new ConnectionParameter( null, LOCALHOST,
ldapServer.getPort(),
             EncryptionMethod.NONE, NetworkProvider.APACHE_DIRECTORY_LDAP_API, AuthenticationMethod.NONE,
null, null,
             null, true, null );
         Connection connection = new Connection( connectionParameter );
@@ -116,7 +116,7 @@ public class DirectoryApiConnectionWrapp
 
         // invalid port
         monitor = getProgressMonitor();
-        connectionParameter = new ConnectionParameter( null, "localhost", AvailablePortFinder.getNextAvailable(),
+        connectionParameter = new ConnectionParameter( null, LOCALHOST, AvailablePortFinder.getNextAvailable(),
             EncryptionMethod.NONE, NetworkProvider.APACHE_DIRECTORY_LDAP_API, AuthenticationMethod.NONE,
null, null,
             null, true, null );
         connection = new Connection( connectionParameter );
@@ -153,7 +153,7 @@ public class DirectoryApiConnectionWrapp
     public void testBind()
     {
         StudioProgressMonitor monitor = getProgressMonitor();
-        ConnectionParameter connectionParameter = new ConnectionParameter( null, "localhost",
ldapServer.getPort(),
+        ConnectionParameter connectionParameter = new ConnectionParameter( null, LOCALHOST,
ldapServer.getPort(),
             EncryptionMethod.NONE, NetworkProvider.APACHE_DIRECTORY_LDAP_API, AuthenticationMethod.SIMPLE,
             "uid=admin,ou=system", "secret", null, true, null );
         Connection connection = new Connection( connectionParameter );
@@ -186,7 +186,7 @@ public class DirectoryApiConnectionWrapp
 
         // simple auth without principal and credential
         monitor = getProgressMonitor();
-        connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
EncryptionMethod.NONE,
+        connectionParameter = new ConnectionParameter( null, LOCALHOST, ldapServer.getPort(),
EncryptionMethod.NONE,
             NetworkProvider.APACHE_DIRECTORY_LDAP_API, AuthenticationMethod.SIMPLE, "uid=admin",
"invalid", null, true,
             null );
         connection = new Connection( connectionParameter );
@@ -200,7 +200,7 @@ public class DirectoryApiConnectionWrapp
 
         // simple auth with invalid principal and credential
         monitor = getProgressMonitor();
-        connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
EncryptionMethod.NONE,
+        connectionParameter = new ConnectionParameter( null, LOCALHOST, ldapServer.getPort(),
EncryptionMethod.NONE,
             NetworkProvider.APACHE_DIRECTORY_LDAP_API, AuthenticationMethod.SIMPLE, "uid=admin,ou=system",
"bar", null,
             true, null );
         connection = new Connection( connectionParameter );
@@ -227,7 +227,7 @@ public class DirectoryApiConnectionWrapp
 
         // simple auth without principal and credential
         monitor = getProgressMonitor();
-        connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
EncryptionMethod.NONE,
+        connectionParameter = new ConnectionParameter( null, LOCALHOST, ldapServer.getPort(),
EncryptionMethod.NONE,
             NetworkProvider.APACHE_DIRECTORY_LDAP_API, AuthenticationMethod.SIMPLE, "uid=admin,ou=system",
"secret",
             null, true, null );
         connection = new Connection( connectionParameter );
@@ -251,7 +251,7 @@ public class DirectoryApiConnectionWrapp
     public void testInitializeAttributesRunnable() throws Exception
     {
         StudioProgressMonitor monitor = getProgressMonitor();
-        ConnectionParameter connectionParameter = new ConnectionParameter( null, "localhost",
ldapServer.getPort(),
+        ConnectionParameter connectionParameter = new ConnectionParameter( null, LOCALHOST,
ldapServer.getPort(),
             EncryptionMethod.NONE, NetworkProvider.APACHE_DIRECTORY_LDAP_API, AuthenticationMethod.SIMPLE,
             "uid=admin,ou=system", "secret", null, true, null );
         Connection connection = new Connection( connectionParameter );
@@ -272,7 +272,7 @@ public class DirectoryApiConnectionWrapp
     public void testConcurrentUseAndCloseOfConnection() throws Exception
     {
         final StudioProgressMonitor monitor = getProgressMonitor();
-        final ConnectionParameter connectionParameter = new ConnectionParameter( null, "localhost",
+        final ConnectionParameter connectionParameter = new ConnectionParameter( null, LOCALHOST,
             ldapServer.getPort(), EncryptionMethod.NONE, NetworkProvider.APACHE_DIRECTORY_LDAP_API,
             AuthenticationMethod.SIMPLE, "uid=admin,ou=system", "secret", null, true, null
);
         final Connection connection = new Connection( connectionParameter );

Modified: directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java?rev=1723789&r1=1723788&r2=1723789&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java
(original)
+++ directory/studio/trunk/tests/test.integration.core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java
Fri Jan  8 20:16:24 2016
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.test.integration.core;
 
 
+import static org.apache.directory.studio.test.integration.core.Constants.LOCALHOST;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -64,8 +65,8 @@ import org.junit.runner.RunWith;
  */
 @RunWith(FrameworkRunner.class)
 @CreateLdapServer(transports =
-    { @CreateTransport(address = "0.0.0.0", protocol = "LDAP"),
-        @CreateTransport(address = "0.0.0.0", protocol = "LDAPS") })
+    { @CreateTransport(protocol = "LDAP"),
+        @CreateTransport(protocol = "LDAPS") })
 public class JNDIConnectionWrapperTest extends AbstractLdapTestUnit
 {
 
@@ -76,7 +77,7 @@ public class JNDIConnectionWrapperTest e
     public void testConnect()
     {
         StudioProgressMonitor monitor = getProgressMonitor();
-        ConnectionParameter connectionParameter = new ConnectionParameter( null, "localhost",
ldapServer.getPort(),
+        ConnectionParameter connectionParameter = new ConnectionParameter( null, LOCALHOST,
ldapServer.getPort(),
             EncryptionMethod.NONE, NetworkProvider.JNDI, AuthenticationMethod.NONE, null,
null, null, true, null );
         Connection connection = new Connection( connectionParameter );
         ConnectionWrapper connectionWrapper = connection.getConnectionWrapper();
@@ -107,7 +108,7 @@ public class JNDIConnectionWrapperTest e
 
         // invalid port
         monitor = getProgressMonitor();
-        connectionParameter = new ConnectionParameter( null, "localhost", AvailablePortFinder.getNextAvailable(),
+        connectionParameter = new ConnectionParameter( null, LOCALHOST, AvailablePortFinder.getNextAvailable(),
             EncryptionMethod.NONE, NetworkProvider.JNDI, AuthenticationMethod.NONE, null,
null, null, true, null );
         connection = new Connection( connectionParameter );
         connectionWrapper = connection.getConnectionWrapper();
@@ -142,7 +143,7 @@ public class JNDIConnectionWrapperTest e
     public void testBind()
     {
         StudioProgressMonitor monitor = getProgressMonitor();
-        ConnectionParameter connectionParameter = new ConnectionParameter( null, "localhost",
ldapServer.getPort(),
+        ConnectionParameter connectionParameter = new ConnectionParameter( null, LOCALHOST,
ldapServer.getPort(),
             EncryptionMethod.NONE, NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin,ou=system",
"secret",
             null, true, null );
         Connection connection = new Connection( connectionParameter );
@@ -175,7 +176,7 @@ public class JNDIConnectionWrapperTest e
 
         // simple auth without principal and credential
         monitor = getProgressMonitor();
-        connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
EncryptionMethod.NONE,
+        connectionParameter = new ConnectionParameter( null, LOCALHOST, ldapServer.getPort(),
EncryptionMethod.NONE,
             NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin", "invalid", null,
true, null );
         connection = new Connection( connectionParameter );
         connectionWrapper = connection.getConnectionWrapper();
@@ -187,7 +188,7 @@ public class JNDIConnectionWrapperTest e
 
         // simple auth with invalid principal and credential
         monitor = getProgressMonitor();
-        connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
EncryptionMethod.NONE,
+        connectionParameter = new ConnectionParameter( null, LOCALHOST, ldapServer.getPort(),
EncryptionMethod.NONE,
             NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin,ou=system", "bar",
null, true, null );
         connection = new Connection( connectionParameter );
         connectionWrapper = connection.getConnectionWrapper();
@@ -212,7 +213,7 @@ public class JNDIConnectionWrapperTest e
 
         // simple auth without principal and credential
         monitor = getProgressMonitor();
-        connectionParameter = new ConnectionParameter( null, "localhost", ldapServer.getPort(),
EncryptionMethod.NONE,
+        connectionParameter = new ConnectionParameter( null, LOCALHOST, ldapServer.getPort(),
EncryptionMethod.NONE,
             NetworkProvider.JNDI, AuthenticationMethod.SIMPLE, "uid=admin,ou=system", "secret",
null, true, null );
         connection = new Connection( connectionParameter );
         connectionWrapper = connection.getConnectionWrapper();

Added: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/Constants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/Constants.java?rev=1723789&view=auto
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/Constants.java
(added)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/Constants.java
Fri Jan  8 20:16:24 2016
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.test.integration.ui;
+
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+
+public final class Constants
+{
+    public static final String LOCALHOST = getLocalHost();
+
+
+    private static String getLocalHost()
+    {
+        try
+        {
+            return InetAddress.getLocalHost().getHostName();
+        }
+        catch ( UnknownHostException e )
+        {
+            return "localhost";
+        }
+    }
+
+}

Propchange: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java?rev=1723789&r1=1723788&r2=1723789&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java
Fri Jan  8 20:16:24 2016
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.test.integration.ui;
 
 
+import static org.apache.directory.studio.test.integration.ui.Constants.LOCALHOST;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -31,6 +32,8 @@ import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.math.BigInteger;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.security.KeyPair;
 import java.security.KeyPairGenerator;
 import java.security.KeyStore;
@@ -183,7 +186,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         // ensure "Next >" button is enabled
         assertFalse( wizardBot.isBackButtonEnabled() );
@@ -200,7 +203,7 @@ public class NewConnectionWizardTest ext
         assertTrue( wizardBot.isCancelButtonEnabled() );
 
         // enter host again
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         // ensure "Next >" button is enabled
         assertFalse( wizardBot.isBackButtonEnabled() );
         assertTrue( wizardBot.isNextButtonEnabled() );
@@ -337,7 +340,7 @@ public class NewConnectionWizardTest ext
     {
         // enter connection parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
 
         // jump to auth page
@@ -357,7 +360,7 @@ public class NewConnectionWizardTest ext
         assertEquals( 1, connectionManager.getConnections().length );
         Connection connection = connectionManager.getConnections()[0];
         assertEquals( getConnectionName(), connection.getName() );
-        assertEquals( "localhost", connection.getHost() );
+        assertEquals( LOCALHOST, connection.getHost() );
         assertEquals( ldapServer.getPort(), connection.getPort() );
         assertEquals( AuthenticationMethod.SIMPLE, connection.getAuthMethod() );
         assertEquals( "uid=admin,ou=system", connection.getBindPrincipal() );
@@ -375,11 +378,11 @@ public class NewConnectionWizardTest ext
      * Tests the "Check Network Parameter" button.
      */
     @Test
-    public void testCheckNetworkParameterButtonOK()
+    public void testCheckNetworkParameterButtonOK() throws UnknownHostException
     {
         // enter connection parameter with host name
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
 
         // click "Check Network Parameter" button
@@ -387,7 +390,7 @@ public class NewConnectionWizardTest ext
         assertNull( "Expected OK", result1 );
 
         // enter connection parameter with IPv4 address
-        wizardBot.typeHost( "127.0.0.1" );
+        wizardBot.typeHost( InetAddress.getLocalHost().getHostAddress() );
         wizardBot.typePort( ldapServer.getPort() );
 
         // click "Check Network Parameter" button
@@ -419,7 +422,7 @@ public class NewConnectionWizardTest ext
         // enter connection parameter with invalid port
         wizardBot.typeConnectionName( getConnectionName() );
         int port = ldapServer.getPort() + 1;
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( port );
 
         // click "Check Network Parameter" button and get the result
@@ -465,7 +468,7 @@ public class NewConnectionWizardTest ext
     {
         // enter connection parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.clickNextButton();
 
@@ -489,7 +492,7 @@ public class NewConnectionWizardTest ext
     {
         // enter connection parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.clickNextButton();
 
@@ -531,7 +534,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.selectStartTlsEncryption();
 
@@ -567,7 +570,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.selectStartTlsEncryption();
 
@@ -603,7 +606,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.selectStartTlsEncryption();
 
@@ -639,7 +642,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.selectStartTlsEncryption();
 
@@ -676,7 +679,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.selectStartTlsEncryption();
         wizardBot.clickNextButton();
@@ -718,7 +721,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.selectStartTlsEncryption();
 
@@ -786,7 +789,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.selectStartTlsEncryption();
         wizardBot.clickNextButton();
@@ -833,7 +836,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPort() );
         wizardBot.selectStartTlsEncryption();
 
@@ -884,7 +887,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPortSSL() );
         wizardBot.selectLdapsEncryption();
         wizardBot.clickNextButton();
@@ -911,7 +914,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPortSSL() );
         wizardBot.selectLdapsEncryption();
         wizardBot.clickNextButton();
@@ -953,7 +956,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPortSSL() );
         wizardBot.selectLdapsEncryption();
         wizardBot.clickNextButton();
@@ -1012,7 +1015,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPortSSL() );
         wizardBot.selectLdapsEncryption();
         wizardBot.clickNextButton();
@@ -1059,7 +1062,7 @@ public class NewConnectionWizardTest ext
 
         // enter connection parameter and authentication parameter
         wizardBot.typeConnectionName( getConnectionName() );
-        wizardBot.typeHost( "localhost" );
+        wizardBot.typeHost( LOCALHOST );
         wizardBot.typePort( ldapServer.getPortSSL() );
         wizardBot.selectLdapsEncryption();
         wizardBot.clickNextButton();

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.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/ConnectionsViewBot.java?rev=1723789&r1=1723788&r2=1723789&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionsViewBot.java
Fri Jan  8 20:16:24 2016
@@ -20,6 +20,8 @@
 package org.apache.directory.studio.test.integration.ui.bots;
 
 
+import static org.apache.directory.studio.test.integration.ui.Constants.LOCALHOST;
+
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
@@ -156,7 +158,7 @@ public class ConnectionsViewBot
         ConnectionParameter connectionParameter = new ConnectionParameter();
         connectionParameter.setNetworkProvider( NetworkProvider.JNDI );
         connectionParameter.setName( name );
-        connectionParameter.setHost( "localhost" );
+        connectionParameter.setHost( LOCALHOST );
         connectionParameter.setPort( port );
         connectionParameter.setEncryptionMethod( EncryptionMethod.NONE );
         connectionParameter.setAuthMethod( AuthenticationMethod.SIMPLE );



Mime
View raw message