directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r519828 - /directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
Date Mon, 19 Mar 2007 04:04:56 GMT
Author: erodriguez
Date: Sun Mar 18 21:04:55 2007
New Revision: 519828

URL: http://svn.apache.org/viewvc?view=rev&rev=519828
Log:
Updates to base class for integration tests:
o  Minor updates due to new LdapConfiguration bean.
o  Addition of schemaRoot, used by integration tests that need to enable schema.  For example,
SASL GSSAPI needs to enable the Kerberos schema.

Modified:
    directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java

Modified: directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?view=diff&rev=519828&r1=519827&r2=519828
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
Sun Mar 18 21:04:55 2007
@@ -56,6 +56,9 @@
     /** the context root for the system partition */
     protected LdapContext sysRoot;
 
+    /** the context root for the schema partition */
+    protected LdapContext schemaRoot;
+
     /** the context root for the rootDSE */
     protected LdapContext rootDSE;
 
@@ -79,7 +82,7 @@
 
         doDelete( configuration.getWorkingDirectory() );
         port = AvailablePortFinder.getNextAvailable( 1024 );
-        configuration.setLdapPort( port );
+        configuration.getLdapConfiguration().setIpPort( port );
         configuration.setShutdownHookEnabled( false );
         setContexts( "uid=admin,ou=system", "secret" );
     }
@@ -136,9 +139,12 @@
         Hashtable<String, Object> envFinal = new Hashtable<String, Object>( env
);
         envFinal.put( Context.PROVIDER_URL, "ou=system" );
         sysRoot = new InitialLdapContext( envFinal, null );
-        
+
         envFinal.put( Context.PROVIDER_URL, "" );
         rootDSE = new InitialLdapContext( envFinal, null );
+
+        envFinal.put( Context.PROVIDER_URL, "ou=schema" );
+        schemaRoot = new InitialLdapContext( envFinal, null );
     }
 
 
@@ -184,10 +190,10 @@
         try
         {
             Iterator iterator = new LdifReader( in );
-            
+
             while ( iterator.hasNext() )
             {
-                Entry entry = ( Entry) iterator.next();
+                Entry entry = ( Entry ) iterator.next();
                 LdapDN dn = new LdapDN( entry.getDn() );
                 rootDSE.createSubcontext( dn, entry.getAttributes() );
             }



Mime
View raw message