You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/02/17 21:23:42 UTC
svn commit: r1071769 [1/4] - in /directory/apacheds/branches/m1:
core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/
kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/
ldap-client-test/src/test/java/org/apache/di...
Author: elecharny
Date: Thu Feb 17 20:23:38 2011
New Revision: 1071769
URL: http://svn.apache.org/viewvc?rev=1071769&view=rev
Log:
o Made LdapServer private in AbstractLdapTestUnit
o Fixed the tests accordingly
Modified:
directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
directory/apacheds/branches/m1/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/NetworkSchemaLoaderTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java
directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointAddIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyDelIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyMultipleChangesIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchMoveAndRenameIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchNoRevertIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchPerfIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsUpdateCertificateIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsConfidentialityIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java
directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsUpdateCertificateIT.java
directory/apacheds/branches/m1/test-framework/src/main/java/org/apache/directory/server/core/integ/AbstractLdapTestUnit.java
directory/apacheds/branches/m1/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkRunner.java
directory/apacheds/branches/m1/test-framework/src/test/java/org/apache/directory/server/core/integ/TestMultiLevelDS.java
directory/apacheds/branches/m1/test-framework/src/test/java/org/apache/directory/server/core/integ/TestWithClassLevelLdapServer.java
Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java Thu Feb 17 20:23:38 2011
@@ -154,7 +154,7 @@ public class PasswordPolicyTest extends
respCtrl = getPwdRespCtrl( addResp );
assertNull( respCtrl );
- LdapConnection userConnection = getNetworkConnectionAs( ldapServer, userDn.getName(), "12345" );
+ LdapConnection userConnection = getNetworkConnectionAs( getLdapServer(), userDn.getName(), "12345" );
assertNotNull( userConnection );
assertTrue( userConnection.isAuthenticated() );
}
@@ -163,7 +163,7 @@ public class PasswordPolicyTest extends
@Test
public void testAddUserWithHashedPwd() throws Exception
{
- LdapConnection connection = getAdminNetworkConnection( ldapServer );
+ LdapConnection connection = getAdminNetworkConnection( getLdapServer() );
byte[] password = PasswordUtil.createStoragePassword( "12345", LdapSecurityConstants.HASH_METHOD_CRYPT );
@@ -195,7 +195,7 @@ public class PasswordPolicyTest extends
respCtrl = getPwdRespCtrl( addResp );
assertNull( respCtrl );
- LdapConnection userConnection = getNetworkConnectionAs( ldapServer, userDn.getName(), "12345" );
+ LdapConnection userConnection = getNetworkConnectionAs( getLdapServer(), userDn.getName(), "12345" );
assertNotNull( userConnection );
assertTrue( userConnection.isAuthenticated() );
}
@@ -206,7 +206,7 @@ public class PasswordPolicyTest extends
{
policyConfig.setPwdMinAge( 5 );
- LdapConnection connection = getAdminNetworkConnection( ldapServer );
+ LdapConnection connection = getAdminNetworkConnection( getLdapServer() );
Dn userDn = new Dn( "cn=userMinAge,ou=system" );
Entry userEntry = LdifUtils.createEntry(userDn, "ObjectClass: top", "ObjectClass: person", "cn: userMinAge",
@@ -238,7 +238,7 @@ public class PasswordPolicyTest extends
modResp = connection.modify( modReq );
assertEquals( ResultCodeEnum.SUCCESS, modResp.getLdapResult().getResultCode() );
- LdapConnection userConnection = getNetworkConnectionAs( ldapServer, userDn.getName(), "123456" );
+ LdapConnection userConnection = getNetworkConnectionAs( getLdapServer(), userDn.getName(), "123456" );
assertNotNull( userConnection );
assertTrue( userConnection.isAuthenticated() );
}
Modified: directory/apacheds/branches/m1/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java (original)
+++ directory/apacheds/branches/m1/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/SaslGssapiBindITest.java Thu Feb 17 20:23:38 2011
@@ -180,7 +180,7 @@ public class SaslGssapiBindITest extends
hostName = "localhost";
}
String servicePrincipal = "ldap/" + hostName + "@EXAMPLE.COM";
- ldapServer.setSaslPrincipal( servicePrincipal );
+ getLdapServer().setSaslPrincipal( servicePrincipal );
Attributes attrs;
@@ -316,7 +316,7 @@ public class SaslGssapiBindITest extends
// Create the initial context
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() );
// Request the use of the "GSSAPI" SASL mechanism
// Authenticate by using already established Kerberos credentials
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java Thu Feb 17 20:23:38 2011
@@ -73,14 +73,14 @@ public class LdapConnectionTest extends
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
@@ -92,7 +92,7 @@ public class LdapConnectionTest extends
@Test
public void testBindRequest() throws Exception
{
- LdapConnection connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ LdapConnection connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
try
{
BindResponse bindResponse = connection.bind( ADMIN_DN, "secret" );
@@ -215,7 +215,7 @@ public class LdapConnectionTest extends
@Test
public void testAnonBind() throws Exception
{
- LdapNetworkConnection conn = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ LdapNetworkConnection conn = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
BindResponse resp = conn.bind();
assertEquals( ResultCodeEnum.SUCCESS, resp.getLdapResult().getResultCode() );
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java Thu Feb 17 20:23:38 2011
@@ -88,12 +88,12 @@ public class LdapSSLConnectionTest exten
sslConfig = new LdapConnectionConfig();
sslConfig.setLdapHost( "localhost" );
sslConfig.setUseSsl( true );
- sslConfig.setLdapPort( ldapServer.getPortSSL() );
+ sslConfig.setLdapPort( getLdapServer().getPortSSL() );
sslConfig.setTrustManagers( new NoVerificationTrustManager() );
tlsConfig = new LdapConnectionConfig();
tlsConfig.setLdapHost( "localhost" );
- tlsConfig.setLdapPort( ldapServer.getPort() );
+ tlsConfig.setLdapPort( getLdapServer().getPort() );
tlsConfig.setTrustManagers( new NoVerificationTrustManager() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/NetworkSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/NetworkSchemaLoaderTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/NetworkSchemaLoaderTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/NetworkSchemaLoaderTest.java Thu Feb 17 20:23:38 2011
@@ -53,14 +53,14 @@ public class NetworkSchemaLoaderTest ext
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAbandonRequestTest.java Thu Feb 17 20:23:38 2011
@@ -64,14 +64,14 @@ public class ClientAbandonRequestTest ex
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java Thu Feb 17 20:23:38 2011
@@ -71,15 +71,15 @@ public class ClientAddRequestTest extend
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
- session = ldapServer.getDirectoryService().getAdminSession();
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
+ session = getLdapServer().getDirectoryService().getAdminSession();
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientCompareRequestTest.java Thu Feb 17 20:23:38 2011
@@ -63,15 +63,15 @@ public class ClientCompareRequestTest ex
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
- session = ldapServer.getDirectoryService().getAdminSession();
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
+ session = getLdapServer().getDirectoryService().getAdminSession();
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientDeleteRequestTest.java Thu Feb 17 20:23:38 2011
@@ -91,15 +91,15 @@ public class ClientDeleteRequestTest ext
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
- session = ldapServer.getDirectoryService().getAdminSession();
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
+ session = getLdapServer().getDirectoryService().getAdminSession();
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java Thu Feb 17 20:23:38 2011
@@ -63,14 +63,14 @@ public class ClientExtendedRequestTest e
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyDnRequestTest.java Thu Feb 17 20:23:38 2011
@@ -68,15 +68,15 @@ public class ClientModifyDnRequestTest e
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
- session = ldapServer.getDirectoryService().getAdminSession();
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
+ session = getLdapServer().getDirectoryService().getAdminSession();
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientModifyRequestTest.java Thu Feb 17 20:23:38 2011
@@ -82,15 +82,15 @@ public class ClientModifyRequestTest ext
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
- session = ldapServer.getDirectoryService().getAdminSession();
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
+ session = getLdapServer().getDirectoryService().getAdminSession();
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
@@ -220,7 +220,7 @@ public class ClientModifyRequestTest ext
modResp = connection.modify( modifyRequest );
assertEquals( ResultCodeEnum.SUCCESS, modResp.getLdapResult().getResultCode() );
- LdapNetworkConnection nonAdminConnection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ LdapNetworkConnection nonAdminConnection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
Dn bindDn = new Dn( "uid=billyd,ou=users,ou=system" );
nonAdminConnection.bind( bindDn.getName(), "secret" );
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java Thu Feb 17 20:23:38 2011
@@ -77,7 +77,7 @@ public class SimpleBindRequestTest exten
@Before
public void setup() throws Exception
{
- connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
}
@@ -143,7 +143,7 @@ public class SimpleBindRequestTest exten
public void testSimpleBindAnonymous() throws Exception
{
//System.out.println( "------------------Create connection" + i + "-------------" );
- LdapConnection connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ LdapConnection connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
//System.out.println( "------------------Bind" + i + "-------------" );
// Try with no parameters
@@ -161,7 +161,7 @@ public class SimpleBindRequestTest exten
connection.close();
// Try with empty strings
- connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
bindResponse = connection.bind( "", "" );
assertNotNull( bindResponse );
@@ -175,7 +175,7 @@ public class SimpleBindRequestTest exten
connection.close();
// Try with null parameters
- connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
bindResponse = connection.bind( ( String ) null, ( String ) null );
assertNotNull( bindResponse );
@@ -189,7 +189,7 @@ public class SimpleBindRequestTest exten
assertFalse( connection.isConnected() );
connection.close();
- connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
//System.out.println( "----------------Unbind done" + i + "-------------" );
assertFalse( connection.isConnected() );
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java Thu Feb 17 20:23:38 2011
@@ -89,14 +89,14 @@ public class ClientSearchRequestTest ext
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/SearchRequestReturningAttributesTest.java Thu Feb 17 20:23:38 2011
@@ -70,14 +70,14 @@ public class SearchRequestReturningAttri
@Before
public void setup() throws Exception
{
- connection = LdapApiIntegrationUtils.getPooledAdminConnection( ldapServer );
+ connection = LdapApiIntegrationUtils.getPooledAdminConnection( getLdapServer() );
}
@After
public void shutdown() throws Exception
{
- LdapApiIntegrationUtils.releasePooledAdminConnection( connection, ldapServer );
+ LdapApiIntegrationUtils.releasePooledAdminConnection( connection, getLdapServer() );
}
Modified: directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java (original)
+++ directory/apacheds/branches/m1/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/perf/TestClientApiPerf.java Thu Feb 17 20:23:38 2011
@@ -72,7 +72,7 @@ public class TestClientApiPerf extends A
long t1 = System.currentTimeMillis();
// Create connection
- LdapConnection connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ LdapConnection connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
connection.bind( "uid=admin,ou=system", "secret" );
long t2 = System.currentTimeMillis();
@@ -107,7 +107,7 @@ public class TestClientApiPerf extends A
long t1 = System.currentTimeMillis();
// Getting the connection
- DirContext ctx = jndiEnv( "localhost", ldapServer.getPort(), "", "uid=admin,ou=system", "secret", false );
+ DirContext ctx = jndiEnv( "localhost", getLdapServer().getPort(), "", "uid=admin,ou=system", "secret", false );
long t2 = System.currentTimeMillis();
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointAddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointAddIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointAddIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointAddIT.java Thu Feb 17 20:23:38 2011
@@ -144,7 +144,7 @@ public class AdministrativePointAddIT ex
public void init() throws Exception
{
connection = IntegrationUtils.getAdminConnection( getService() );
- schemaManager = ldapServer.getDirectoryService().getSchemaManager();
+ schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
}
@@ -174,7 +174,7 @@ public class AdministrativePointAddIT ex
@Test
public void testAddIAP() throws Exception
{
- assertTrue( ldapServer.isStarted() );
+ assertTrue( getLdapServer().isStarted() );
// First check that we can't add an IAP in the DIT if there is no
// parent AAP or SAP with the same role
@@ -306,7 +306,7 @@ public class AdministrativePointAddIT ex
@Test
public void testAddSAP() throws Exception
{
- assertTrue( ldapServer.isStarted() );
+ assertTrue( getLdapServer().isStarted() );
// First check that we can add a SAP in the DIT if there is no
// parent AAP or SAP
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyDelIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyDelIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyDelIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyDelIT.java Thu Feb 17 20:23:38 2011
@@ -267,7 +267,7 @@ public class AdministrativePointModifyDe
public void init() throws Exception
{
connection = IntegrationUtils.getAdminConnection( getService() );
- schemaManager = ldapServer.getDirectoryService().getSchemaManager();
+ schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
}
@@ -298,7 +298,7 @@ public class AdministrativePointModifyDe
@Ignore
public void testModifyRemoveAAP() throws Exception
{
- assertTrue( ldapServer.isStarted() );
+ assertTrue( getLdapServer().isStarted() );
// Remove the AAP
Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
@@ -317,7 +317,7 @@ public class AdministrativePointModifyDe
@Test
public void testDeleteSAP() throws Exception
{
- assertTrue( ldapServer.isStarted() );
+ assertTrue( getLdapServer().isStarted() );
}
@@ -327,6 +327,6 @@ public class AdministrativePointModifyDe
@Test
public void testDeleteIAP() throws Exception
{
- assertTrue( ldapServer.isStarted() );
+ assertTrue( getLdapServer().isStarted() );
}
}
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointModifyIT.java Thu Feb 17 20:23:38 2011
@@ -266,7 +266,7 @@ public class AdministrativePointModifyIT
public void init() throws Exception
{
connection = IntegrationUtils.getAdminConnection( getService() );
- schemaManager = ldapServer.getDirectoryService().getSchemaManager();
+ schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
}
@@ -296,7 +296,7 @@ public class AdministrativePointModifyIT
@Test
public void testModifyAAPToSAPWithIAPBelow() throws Exception
{
- assertTrue( ldapServer.isStarted() );
+ assertTrue( getLdapServer().isStarted() );
// Remove the AAP
Modification modificationDelAap = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/admin/AdministrativePointPersistentIT.java Thu Feb 17 20:23:38 2011
@@ -137,7 +137,7 @@ public class AdministrativePointPersiste
public void init() throws Exception
{
connection = IntegrationUtils.getAdminConnection( getService() );
- schemaManager = ldapServer.getDirectoryService().getSchemaManager();
+ schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
}
@@ -167,23 +167,23 @@ public class AdministrativePointPersiste
@Test
public void testPersistAutonomousArea() throws Exception
{
- assertTrue( ldapServer.isStarted() );
+ assertTrue( getLdapServer().isStarted() );
// Stop the server now, we will restart it immediately
- ldapServer.stop();
- assertFalse( ldapServer.isStarted() );
+ getLdapServer().stop();
+ assertFalse( getLdapServer().isStarted() );
// And shutdown the DS too
- ldapServer.getDirectoryService().shutdown();
- assertFalse( ldapServer.getDirectoryService().isStarted() );
+ getLdapServer().getDirectoryService().shutdown();
+ assertFalse( getLdapServer().getDirectoryService().isStarted() );
// And restart
- ldapServer.getDirectoryService().startup();
- ldapServer.start();
- schemaManager = ldapServer.getDirectoryService().getSchemaManager();
+ getLdapServer().getDirectoryService().startup();
+ getLdapServer().start();
+ schemaManager = getLdapServer().getDirectoryService().getSchemaManager();
assertTrue( getService().isStarted() );
- assertTrue( ldapServer.getDirectoryService().isStarted() );
+ assertTrue( getLdapServer().getDirectoryService().isStarted() );
// Check that the roles are present
assertEquals( "autonomousArea", getAdminRole( "ou=AAP1,ou=noAP1,ou=system" ).getString() );
@@ -191,12 +191,12 @@ public class AdministrativePointPersiste
assertEquals( "autonomousArea", getAdminRole( "ou=subAAP1,ou=noAP3,ou=AAP2,ou=system" ).getString() );
// Check the caches
- DnNode<AccessControlAdministrativePoint> acCache = ldapServer.getDirectoryService().getAccessControlAPCache();
- DnNode<CollectiveAttributeAdministrativePoint> caCache = ldapServer.getDirectoryService()
+ DnNode<AccessControlAdministrativePoint> acCache = getLdapServer().getDirectoryService().getAccessControlAPCache();
+ DnNode<CollectiveAttributeAdministrativePoint> caCache = getLdapServer().getDirectoryService()
.getCollectiveAttributeAPCache();
- DnNode<TriggerExecutionAdministrativePoint> teCache = ldapServer.getDirectoryService()
+ DnNode<TriggerExecutionAdministrativePoint> teCache = getLdapServer().getDirectoryService()
.getTriggerExecutionAPCache();
- DnNode<SubschemaAdministrativePoint> ssCache = ldapServer.getDirectoryService().getSubschemaAPCache();
+ DnNode<SubschemaAdministrativePoint> ssCache = getLdapServer().getDirectoryService().getSubschemaAPCache();
// The ACs
AdministrativePoint aap1 = acCache.getElement( new Dn( schemaManager, "ou=AAP1,ou=noAP1,ou=system" ) );
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java Thu Feb 17 20:23:38 2011
@@ -181,7 +181,7 @@ public class KeyDerivationServiceIT exte
@Before
public void setUp() throws Exception
{
- DirContext schemaRoot = ( DirContext ) getWiredContext( ldapServer ).lookup( "ou=schema" );
+ DirContext schemaRoot = ( DirContext ) getWiredContext( getLdapServer() ).lookup( "ou=schema" );
// -------------------------------------------------------------------
// Enable the krb5kdc schema
@@ -205,7 +205,7 @@ public class KeyDerivationServiceIT exte
schemaRoot.modifyAttributes( "cn=Krb5kdc", mods );
}
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( "dc=example,dc=com" );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( "dc=example,dc=com" );
Attributes attrs = getOrgUnitAttributes( "users" );
DirContext users = ctx.createSubcontext( "ou=users", attrs );
@@ -225,7 +225,7 @@ public class KeyDerivationServiceIT exte
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -296,7 +296,7 @@ public class KeyDerivationServiceIT exte
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -433,7 +433,7 @@ public class KeyDerivationServiceIT exte
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -562,7 +562,7 @@ public class KeyDerivationServiceIT exte
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getPort() + "/ou=users,dc=example,dc=com" );
+ env.put( "java.naming.provider.url", "ldap://localhost:" + getLdapServer().getPort() + "/ou=users,dc=example,dc=com" );
env.put( "java.naming.security.principal", "uid=admin,ou=system" );
env.put( "java.naming.security.credentials", "secret" );
env.put( "java.naming.security.authentication", "simple" );
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java Thu Feb 17 20:23:38 2011
@@ -118,7 +118,7 @@ public class PasswordPolicyServiceIT ext
Attributes attrs;
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getPort() + "/dc=example,dc=com" );
+ env.put( "java.naming.provider.url", "ldap://localhost:" + getLdapServer().getPort() + "/dc=example,dc=com" );
env.put( "java.naming.security.principal", "uid=admin,ou=system" );
env.put( "java.naming.security.credentials", "secret" );
env.put( "java.naming.security.authentication", "simple" );
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java Thu Feb 17 20:23:38 2011
@@ -192,7 +192,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddObjectClasses() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// modify object classes, add two more
Attributes attributes = LdifUtils.createAttributes("objectClass: organizationalPerson",
@@ -224,7 +224,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testModifyDescription() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
String newDescription = "More info on the user ...";
@@ -253,7 +253,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddWithMissingRequiredAttributes() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// person without sn
Attributes attrs = new BasicAttributes( true );
@@ -285,7 +285,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddEntryWithTwoDescriptions() throws Exception
{
- LdapConnection con = getClientApiConnection( ldapServer );
+ LdapConnection con = getClientApiConnection( getLdapServer() );
String dn = "cn=Kate Bush," + BASE;
Entry kate = new DefaultEntry( new Dn( dn ) );
@@ -325,7 +325,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddEntryWithTwoDescriptionsVariant() throws Exception
{
- LdapConnection con = getClientApiConnection( ldapServer );
+ LdapConnection con = getClientApiConnection( getLdapServer() );
String dn = "cn=Kate Bush," + BASE;
Entry kate = new DefaultEntry( new Dn( dn ) );
@@ -365,7 +365,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddEntryWithTwoDescriptionsSecondVariant() throws Exception
{
- LdapConnection con = getClientApiConnection( ldapServer );
+ LdapConnection con = getClientApiConnection( getLdapServer() );
String dn = "cn=Kate Bush," + BASE;
Entry kate = new DefaultEntry( new Dn( dn ) );
@@ -405,7 +405,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddWithInvalidNumberOfAttributeValues() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// add inetOrgPerson with two displayNames
Attributes attrs = new BasicAttributes( true );
@@ -439,7 +439,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddAlias() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// Create entry
Attributes entry = new BasicAttributes( true );
@@ -479,7 +479,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddAliasInContainer() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// Create container
Attributes container = new BasicAttributes( true );
@@ -551,7 +551,7 @@ public class AddIT extends AbstractLdapT
ne = containerCtx.search( "ou=bestFruit", "(objectClass=*)", controls );
assertTrue( ne.hasMore() );
sr = ne.next();
- assertEquals( "ldap://localhost:" + ldapServer.getPort() + "/ou=favorite,ou=Fruits,ou=system", sr.getName() );
+ assertEquals( "ldap://localhost:" + getLdapServer().getPort() + "/ou=favorite,ou=Fruits,ou=system", sr.getName() );
assertFalse( ne.hasMore() );
// Remove alias and entry
@@ -573,7 +573,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddDeleteAlias() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// Create entry ou=favorite,ou=system
Attributes entry = new BasicAttributes( true );
@@ -616,7 +616,7 @@ public class AddIT extends AbstractLdapT
public void testAddDeleteAlias2() throws Exception
{
// use a partition with suffix size 2
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE_EXAMPLE_COM );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE_EXAMPLE_COM );
// Create entry ou=favorite,dc=example,dc=com
Attributes entry = new BasicAttributes( true );
@@ -659,7 +659,7 @@ public class AddIT extends AbstractLdapT
public void testAddDeleteAlias3() throws Exception
{
// use a partition with suffix size 3
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE_DIRECTORY_APACHE_ORG );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE_DIRECTORY_APACHE_ORG );
// Create entry ou=favorite,dc=directory,dc=apache,dc=org
Attributes entry = new BasicAttributes( true );
@@ -696,7 +696,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testOnReferralWithManageDsaITControl() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapServer );
+ LDAPConnection conn = getWiredConnection( getLdapServer() );
LDAPConstraints constraints = new LDAPSearchConstraints();
constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -759,7 +759,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testOnReferralWitJNDIIgnore() throws Exception
{
- LdapContext MNNCtx = getContext( ServerDNConstants.ADMIN_SYSTEM_DN, ldapServer.getDirectoryService(),
+ LdapContext MNNCtx = getContext( ServerDNConstants.ADMIN_SYSTEM_DN, getLdapServer().getDirectoryService(),
"uid=akarasuluref,ou=users,ou=system" );
// Set to 'ignore'
@@ -791,7 +791,7 @@ public class AddIT extends AbstractLdapT
{
LOG.debug( "" );
- LDAPConnection conn = getWiredConnection( ldapServer );
+ LDAPConnection conn = getWiredConnection( getLdapServer() );
LDAPConstraints constraints = new LDAPConstraints();
conn.setConstraints( constraints );
@@ -824,7 +824,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testOnReferral() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapServer );
+ LDAPConnection conn = getWiredConnection( getLdapServer() );
LDAPConstraints constraints = new LDAPConstraints();
constraints.setReferrals( false );
conn.setConstraints( constraints );
@@ -860,7 +860,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testThrowOnReferralWithJndi() throws Exception
{
- LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+ LdapContext ctx = getWiredContextThrowOnRefferal( getLdapServer() );
SearchControls controls = new SearchControls();
controls.setReturningAttributes( new String[0] );
controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -893,7 +893,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testDIRSERVER_1183() throws Exception
{
- LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+ LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
Attributes attrs = new BasicAttributes( "objectClass", "inetOrgPerson", true );
attrs.get( "objectClass" ).add( "organizationalPerson" );
attrs.get( "objectClass" ).add( "person" );
@@ -911,7 +911,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddEntryNoRDNInEntry() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -950,7 +950,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddEntryDifferentRDNInEntry() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -997,7 +997,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddEntryDifferentRDNSingleValuedInEntry() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -1039,7 +1039,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddEntryComposedRDN() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -1090,8 +1090,8 @@ public class AddIT extends AbstractLdapT
public void testAddPDUExceedingMaxSizeJNDI() throws Exception
{
// Limit the PDU size to 1024
- ldapServer.getDirectoryService().setMaxPDUSize( 1024 );
- DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ getLdapServer().getDirectoryService().setMaxPDUSize( 1024 );
+ DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// modify object classes, add two more
Attributes attributes = new BasicAttributes( true );
@@ -1122,9 +1122,9 @@ public class AddIT extends AbstractLdapT
// Test again with a bigger size
// Limit the PDU size to 1024
- ldapServer.getDirectoryService().setMaxPDUSize( 4096 );
+ getLdapServer().getDirectoryService().setMaxPDUSize( 4096 );
- ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
person = ( DirContext ) ctx.lookup( RDN );
try
@@ -1138,7 +1138,7 @@ public class AddIT extends AbstractLdapT
}
// Read again from directory
- ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+ ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
person = ( DirContext ) ctx.lookup( RDN );
assertNotNull( person );
@@ -1159,8 +1159,8 @@ public class AddIT extends AbstractLdapT
public void testAddPDUExceedingMaxSizeLdapApi() throws Exception
{
// Limit the PDU size to 1024
- ldapServer.getDirectoryService().setMaxPDUSize( 1024 );
- LdapConnection connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
+ getLdapServer().getDirectoryService().setMaxPDUSize( 1024 );
+ LdapConnection connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
connection.setTimeOut( Integer.MAX_VALUE );
connection.bind( "uid=admin,ou=system", "secret" );
@@ -1205,7 +1205,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddUnescapedRdnValue_DIRSERVER_1311() throws Exception
{
- LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+ LdapContext ctx = ( LdapContext ) getWiredContext( getLdapServer() ).lookup( BASE );
Attributes tori = new BasicAttributes( true );
Attribute toriOC = new BasicAttribute( "objectClass" );
@@ -1265,7 +1265,7 @@ public class AddIT extends AbstractLdapT
@Test
public void testAddEntryUUIDAndCSNAttributes() throws Exception
{
- LdapConnection con = getClientApiConnection( ldapServer );
+ LdapConnection con = getClientApiConnection( getLdapServer() );
String dn = "cn=Kate Bush," + BASE;
Entry entry = new DefaultEntry( new Dn( dn ) );
@@ -1344,7 +1344,7 @@ public class AddIT extends AbstractLdapT
@Test
public void test_DIRSERVER_1357() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( getLdapServer() ).lookup( "ou=system" );
Attributes salesAttrs = getOrgUnitAttributes( "sales" );
ctx.createSubcontext( "ou=sales", salesAttrs );
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java Thu Feb 17 20:23:38 2011
@@ -83,7 +83,7 @@ public class AddingEntriesWithSpecialCha
@Test
public void testAddingWithHashRdn() throws Exception
{
- LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( ldapServer );
+ LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer() );
Entry personEntry = getPersonEntry( "Bush", "Kate#Bush" );
String dn = "cn=Kate\\#Bush,ou=system";
@@ -118,7 +118,7 @@ public class AddingEntriesWithSpecialCha
@Test
public void testAddingWithCommaInRdn() throws Exception
{
- LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( ldapServer );
+ LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer() );
Entry entry = getPersonEntry( "Bush", "Bush, Kate" );
String dn = "cn=Bush\\, Kate,ou=system";
@@ -152,7 +152,7 @@ public class AddingEntriesWithSpecialCha
@Test
public void testAddingWithQuotesInRdn() throws Exception
{
- LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( ldapServer );
+ LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer() );
Entry entry = getPersonEntry( "Messer", "Mackie \"The Knife\" Messer" );
String dn = "cn=Mackie \\\"The Knife\\\" Messer,ou=system";
@@ -184,7 +184,7 @@ public class AddingEntriesWithSpecialCha
@Test
public void testAddingWithBackslashInRdn() throws Exception
{
- LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( ldapServer );
+ LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer() );
Entry entry = getOrgUnitEntry( "AC\\DC" );
String dn = "ou=AC\\\\DC,ou=system";
@@ -218,7 +218,7 @@ public class AddingEntriesWithSpecialCha
@Test
public void testAddingWithGreaterSignInRdn() throws Exception
{
- LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( ldapServer );
+ LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer() );
Entry entry = getOrgUnitEntry( "East -> West" );
String dn = "ou=East -\\> West,ou=system";
@@ -254,7 +254,7 @@ public class AddingEntriesWithSpecialCha
@Test
public void testAddingWithLessSignInRdn() throws Exception
{
- LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( ldapServer );
+ LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer() );
Entry entry = getOrgUnitEntry( "Scissors 8<" );
String dn = "ou=Scissors 8\\<,ou=system";
@@ -290,7 +290,7 @@ public class AddingEntriesWithSpecialCha
@Test
public void testAddingWithSemicolonInRdn() throws Exception
{
- LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( ldapServer );
+ LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer() );
Entry entry = getOrgUnitEntry( "semicolon group;" );
String dn = "ou=semicolon group\\;,ou=system";
@@ -326,7 +326,7 @@ public class AddingEntriesWithSpecialCha
@Test
public void testAddingWithEqualsInRdn() throws Exception
{
- LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( ldapServer );
+ LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer() );
Entry entry = getOrgUnitEntry( "nomen=omen" );
String dn = "ou=nomen\\=omen,ou=system";
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java Thu Feb 17 20:23:38 2011
@@ -101,7 +101,7 @@ public class BindIT extends AbstractLdap
{
try
{
- getWiredContext( ldapServer, "cn=bogus", "blah" );
+ getWiredContext( getLdapServer(), "cn=bogus", "blah" );
fail( "should never get here due to a " );
}
catch ( AuthenticationException e )
@@ -118,7 +118,7 @@ public class BindIT extends AbstractLdap
{
try
{
- getWiredContext( ldapServer, "system", "blah" );
+ getWiredContext( getLdapServer(), "system", "blah" );
fail( "should never get here due to a " );
}
catch ( InvalidNameException e ){}
@@ -134,7 +134,7 @@ public class BindIT extends AbstractLdap
{
try
{
- getWiredContext( ldapServer, "cn=bogus,ou=system", "blah" );
+ getWiredContext( getLdapServer(), "cn=bogus,ou=system", "blah" );
fail( "should never get here due to a " );
}
catch ( AuthenticationException e )
@@ -151,7 +151,7 @@ public class BindIT extends AbstractLdap
try
{
conn = new LDAPConnection();
- conn.connect( 100, "localhost", ldapServer.getPort(), "uid=admin,ou=system", "secret" );
+ conn.connect( 100, "localhost", getLdapServer().getPort(), "uid=admin,ou=system", "secret" );
fail( "try to connect with illegal version number should fail" );
}
catch ( LDAPException e )
@@ -182,7 +182,7 @@ public class BindIT extends AbstractLdap
try
{
- conn.connect( 3, "localhost", ldapServer.getPort(),
+ conn.connect( 3, "localhost", getLdapServer().getPort(),
"uid=akarasuluref,ou=users,ou=system", "secret", constraints );
fail( "try to connect with illegal version number should fail" );
}
@@ -193,7 +193,7 @@ public class BindIT extends AbstractLdap
try
{
- conn.connect( 3, "localhost", ldapServer.getPort(),
+ conn.connect( 3, "localhost", getLdapServer().getPort(),
"uid=akarasuluref,ou=users,ou=system", "secret" );
fail( "try to connect with illegal version number should fail" );
}
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/DelegatedAuthIT.java Thu Feb 17 20:23:38 2011
@@ -94,7 +94,7 @@ public class DelegatedAuthIT extends Abs
{
assertTrue( getService().isStarted() );
assertEquals( "DelegatedAuthIT-method", getService().getInstanceId() );
- LdapConnection ldapConnection = LdapConnectionFactory.getNetworkConnection( "localhost", ldapServer.getPort() );
+ LdapConnection ldapConnection = LdapConnectionFactory.getNetworkConnection( "localhost", getLdapServer().getPort() );
BindResponse bindResponse = ldapConnection.bind( "uid=antoine,ou=users,ou=system", "secret" );
if ( bindResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
@@ -172,7 +172,7 @@ public class DelegatedAuthIT extends Abs
{
assertTrue( getService().isStarted() );
assertEquals( "DelegatedAuthIT-MultipleAuthenticators-method", getService().getInstanceId() );
- LdapConnection ldapConnection = LdapConnectionFactory.getNetworkConnection( "localhost", ldapServer.getPort() );
+ LdapConnection ldapConnection = LdapConnectionFactory.getNetworkConnection( "localhost", getLdapServer().getPort() );
BindResponse bindResponse = ldapConnection.bind( "uid=emmanuel,ou=users,ou=system", "sesame" );
if ( bindResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java?rev=1071769&r1=1071768&r2=1071769&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java (original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java Thu Feb 17 20:23:38 2011
@@ -67,7 +67,6 @@ import org.apache.directory.server.ldap.
import org.apache.directory.shared.asn1.util.Asn1StringUtils;
import org.apache.directory.shared.ldap.model.constants.SupportedSaslMechanisms;
import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.message.controls.AbstractControl;
import org.apache.directory.shared.ldap.model.message.controls.OpaqueControl;
import org.apache.directory.shared.ldap.util.JndiUtils;
import org.junit.After;
@@ -117,7 +116,7 @@ public class MiscBindIT extends Abstract
@Before
public void init() throws Exception
{
- ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+ getLdapServer().addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
// Setup SASL Mechanisms
@@ -137,15 +136,15 @@ public class MiscBindIT extends Abstract
mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
- ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
- oldAnnonymousAccess = ldapServer.getDirectoryService().isAllowAnonymousAccess();
+ getLdapServer().setSaslMechanismHandlers( mechanismHandlerMap );
+ oldAnnonymousAccess = getLdapServer().getDirectoryService().isAllowAnonymousAccess();
}
@After
public void revertAnonnymous()
{
- ldapServer.getDirectoryService().setAllowAnonymousAccess( oldAnnonymousAccess );
+ getLdapServer().getDirectoryService().setAllowAnonymousAccess( oldAnnonymousAccess );
}
@@ -158,12 +157,12 @@ public class MiscBindIT extends Abstract
@Test
public void testDisableAnonymousBinds() throws Exception
{
- ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
+ getLdapServer().getDirectoryService().setAllowAnonymousAccess( false );
// Use the SUN JNDI provider to hit server port and bind as anonymous
final Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/ou=system" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() + "/ou=system" );
env.put( Context.SECURITY_AUTHENTICATION, "none" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -181,7 +180,7 @@ public class MiscBindIT extends Abstract
{
// Use the netscape API as JNDI cannot be used to do a search without
// first binding.
- LDAPUrl url = new LDAPUrl( "localhost", ldapServer.getPort(), "ou=system", new String[]{"vendorName"}, 0, "(ObjectClass=*)" );
+ LDAPUrl url = new LDAPUrl( "localhost", getLdapServer().getPort(), "ou=system", new String[]{"vendorName"}, 0, "(ObjectClass=*)" );
LDAPConnection.search( url );
fail();
@@ -202,12 +201,12 @@ public class MiscBindIT extends Abstract
@Test
public void testEnableAnonymousBindsOnRootDSE() throws Exception
{
- ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+ getLdapServer().getDirectoryService().setAllowAnonymousAccess( true );
// Use the SUN JNDI provider to hit server port and bind as anonymous
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() + "/" );
env.put( Context.SECURITY_AUTHENTICATION, "none" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -240,12 +239,12 @@ public class MiscBindIT extends Abstract
@Test
public void testAnonymousBindsEnabledBaseSearch() throws Exception
{
- ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+ getLdapServer().getDirectoryService().setAllowAnonymousAccess( true );
// Use the SUN JNDI provider to hit server port and bind as anonymous
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() + "/" );
env.put( Context.SECURITY_AUTHENTICATION, "none" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -277,13 +276,13 @@ public class MiscBindIT extends Abstract
@Test
public void testAdminAccessBug() throws Exception
{
- ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+ getLdapServer().getDirectoryService().setAllowAnonymousAccess( true );
// Use the SUN JNDI provider to hit server port and bind as anonymous
final Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() );
env.put( "java.naming.ldap.version", "3" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -319,11 +318,11 @@ public class MiscBindIT extends Abstract
@Test
public void testUserAuthOnMixedCaseSuffix() throws Exception
{
- ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+ getLdapServer().getDirectoryService().setAllowAnonymousAccess( true );
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/dc=aPache,dc=org" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() + "/dc=aPache,dc=org" );
env.put( "java.naming.ldap.version", "3" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
InitialDirContext ctx = new InitialDirContext( env );
@@ -358,11 +357,11 @@ public class MiscBindIT extends Abstract
Control unsupported = new OpaqueControl( "1.1.1.1" );
unsupported.setCritical( true );
- ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
+ getLdapServer().getDirectoryService().setAllowAnonymousAccess( true );
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/ou=system" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + getLdapServer().getPort() + "/ou=system" );
env.put( "java.naming.ldap.version", "3" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
@@ -379,7 +378,7 @@ public class MiscBindIT extends Abstract
user.put( oc );
user.put( "sn", "Bush" );
user.put( "userPassword", "Aerial" );
- ctx.setRequestControls( JndiUtils.toJndiControls( ldapServer.getDirectoryService().getLdapCodecService(),
+ ctx.setRequestControls( JndiUtils.toJndiControls( getLdapServer().getDirectoryService().getLdapCodecService(),
new Control[] {unsupported} ) );
try
@@ -392,7 +391,7 @@ public class MiscBindIT extends Abstract
}
unsupported.setCritical( false );
- ctx.setRequestControls( JndiUtils.toJndiControls( ldapServer.getDirectoryService().getLdapCodecService(),
+ ctx.setRequestControls( JndiUtils.toJndiControls( getLdapServer().getDirectoryService().getLdapCodecService(),
new Control[]{unsupported} ) );
DirContext kate = ctx.createSubcontext( "cn=Kate Bush", user );