directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r519830 - in /directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server: DefaultServerTriggerServiceTest.java SaslBindTest.java StoredProcedureTest.java ssl/LdapsITest.java
Date Mon, 19 Mar 2007 04:08:08 GMT
Author: erodriguez
Date: Sun Mar 18 21:08:07 2007
New Revision: 519830

URL: http://svn.apache.org/viewvc?view=rev&rev=519830
Log:
Minor updates to server-unit integration tests to reflect new LdapConfiguration bean subordinate
to ServerStartupConfiguration.

Modified:
    directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/DefaultServerTriggerServiceTest.java
    directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java
    directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java
    directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java

Modified: directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/DefaultServerTriggerServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/DefaultServerTriggerServiceTest.java?view=diff&rev=519830&r1=519829&r2=519830
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/DefaultServerTriggerServiceTest.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/DefaultServerTriggerServiceTest.java
Sun Mar 18 21:08:07 2007
@@ -31,6 +31,7 @@
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.ldap.LdapConfiguration;
 import org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -49,9 +50,10 @@
     
     public void setUp() throws Exception
     {
-        Set handlers = new HashSet( super.configuration.getExtendedOperationHandlers() );
+        LdapConfiguration ldapCfg = super.configuration.getLdapConfiguration();
+        Set handlers = new HashSet( ldapCfg.getExtendedOperationHandlers() );
         handlers.add( new StoredProcedureExtendedOperationHandler() );
-        super.configuration.setExtendedOperationHandlers( handlers );
+        ldapCfg.setExtendedOperationHandlers( handlers );
         
         super.setUp();
 

Modified: directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java?view=diff&rev=519830&r1=519829&r2=519830
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/SaslBindTest.java
Sun Mar 18 21:08:07 2007
@@ -58,6 +58,7 @@
     public void setUp() throws Exception
     {
         configuration.setAllowAnonymousAccess( false );
+        configuration.getLdapConfiguration().setSaslHost( "localhost" );
 
         Attributes attrs;
         Set<PartitionConfiguration> pcfgs = new HashSet<PartitionConfiguration>();
@@ -404,7 +405,7 @@
         }
         catch ( NamingException e )
         {
-            assertTrue( e.getCause().getMessage().contains( "Error acquiring realm" ) );
+            assertTrue( e.getMessage().contains( "Nonexistent realm" ) );
         }
     }
 

Modified: directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java?view=diff&rev=519830&r1=519829&r2=519830
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/StoredProcedureTest.java
Sun Mar 18 21:08:07 2007
@@ -29,6 +29,7 @@
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.ldap.LdapConfiguration;
 import org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.sp.JavaStoredProcedureUtils;
@@ -45,10 +46,11 @@
     
     public void setUp() throws Exception
     {
-        Set handlers = new HashSet( super.configuration.getExtendedOperationHandlers() );
+        LdapConfiguration ldapCfg = super.configuration.getLdapConfiguration();
+        Set handlers = new HashSet( ldapCfg.getExtendedOperationHandlers() );
         handlers.add( new StoredProcedureExtendedOperationHandler() );
-        super.configuration.setExtendedOperationHandlers( handlers );
-        
+        ldapCfg.setExtendedOperationHandlers( handlers );
+
         super.setUp();
 
         Hashtable env = new Hashtable();

Modified: directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java?view=diff&rev=519830&r1=519829&r2=519830
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/test/java/org/apache/directory/server/ssl/LdapsITest.java
Sun Mar 18 21:08:07 2007
@@ -30,6 +30,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 
+import org.apache.directory.server.ldap.LdapConfiguration;
 import org.apache.directory.server.ssl.support.SSLSocketFactory;
 import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
@@ -59,15 +60,17 @@
         doDelete( configuration.getWorkingDirectory() );
 
         int ldapsPort = AvailablePortFinder.getNextAvailable( 8192 );
-        configuration.setEnableLdaps( true );
-        configuration.setLdapsCertificatePassword( "boguspw" );
-        configuration.setLdapsPort( ldapsPort );
+        
+        LdapConfiguration ldapsCfg = configuration.getLdapsConfiguration();
+        ldapsCfg.setEnableLdaps( true );
+        ldapsCfg.setLdapsCertificatePassword( "boguspw" );
+        ldapsCfg.setIpPort( ldapsPort );
 
         // Copy the bogus certificate to the certificates directory.
         InputStream in = getClass().getResourceAsStream( "/bogus.cert" );
-        configuration.getLdapsCertificateFile().getParentFile().mkdirs();
+        ldapsCfg.getLdapsCertificateFile().getParentFile().mkdirs();
 
-        FileOutputStream out = new FileOutputStream( configuration.getLdapsCertificateFile()
);
+        FileOutputStream out = new FileOutputStream( ldapsCfg.getLdapsCertificateFile() );
 
         for ( ;; )
         {
@@ -86,7 +89,7 @@
         super.setUp();
         doDelete = true;
 
-        Hashtable env = new Hashtable();
+        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:" + ldapsPort + "/ou=system"
);
         env.put( "java.naming.ldap.factory.socket", SSLSocketFactory.class.getName() );
@@ -111,6 +114,8 @@
 
     /**
      * Just a little test to check if the connection is made successfully.
+     * 
+     * @throws NamingException
      */
     public void testSetUpTearDown() throws NamingException
     {



Mime
View raw message