directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r957267 - in /directory: apacheds/trunk/ apacheds/trunk/default-config/ apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/ apacheds/trunk/server-config/ installers/trunk/apacheds-noarch/
Date Wed, 23 Jun 2010 16:43:12 GMT
Author: elecharny
Date: Wed Jun 23 16:43:11 2010
New Revision: 957267

URL: http://svn.apache.org/viewvc?rev=957267&view=rev
Log:
applied back rev 955622/623 and fixed 039

Added:
    directory/apacheds/trunk/server-config/
      - copied from r957179, directory/apacheds/trunk/default-config/
Removed:
    directory/apacheds/trunk/default-config/
Modified:
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
    directory/apacheds/trunk/pom.xml
    directory/apacheds/trunk/server-config/pom.xml
    directory/installers/trunk/apacheds-noarch/pom.xml

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=957267&r1=957266&r2=957267&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Wed Jun 23 16:43:11 2010
@@ -23,14 +23,10 @@ package org.apache.directory.server.core
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.io.File;
-import java.util.Map;
-import java.util.Set;
 
-import org.apache.commons.lang.NotImplementedException;
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
@@ -40,6 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
+import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
 import org.apache.directory.shared.ldap.util.LdapExceptionUtils;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -52,12 +49,10 @@ import org.junit.Test;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-//@Ignore ( "Ignore this test until we get the LDIF partition in place." )
 public class PartitionSchemaLoaderTest
 {
     private static SchemaManager schemaManager;
     private static DirectoryService directoryService;
-    private static JdbmPartition schemaPartition;
 
 
     @BeforeClass public static void setUp() throws Exception
@@ -96,153 +91,118 @@ public class PartitionSchemaLoaderTest
         {
             fail( "Schema load failed : " + LdapExceptionUtils.printErrors( schemaManager.getErrors()
) );
         }
-
-        // --------------------------------------------------------------------
-        // TODO add code here to start up the LDIF schema partition
-        // --------------------------------------------------------------------
-
-        throw new NotImplementedException();
+        
+        directoryService.setSchemaManager( schemaManager );
     }
     
     
-    @Test public void testGetSchemas() throws Exception
+    @Test 
+    public void testGetSchemas() throws Exception
     {
-        PartitionSchemaLoader loader = new PartitionSchemaLoader( schemaPartition, schemaManager
);
-        Map<String,Schema> schemas = loader.getSchemas();
-        
-        Schema schema = schemas.get( "mozilla" );
+        SchemaLoader loader = directoryService.getSchemaManager().getLoader();
+
+        Schema schema = loader.getSchema( "mozilla" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "mozilla" );
-        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "core" );
+        schema = loader.getSchema( "core" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "core" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "apachedns" );
+        schema = loader.getSchema( "apachedns" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "apachedns" );
-        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "autofs" );
+        schema = loader.getSchema( "autofs" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "autofs" );
-        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "apache" );
+        schema = loader.getSchema( "apache" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "apache" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
 
-        schema = schemas.get( "cosine" );
+        schema = loader.getSchema( "cosine" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "cosine" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "krb5kdc" );
+        schema = loader.getSchema( "krb5kdc" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "krb5kdc" );
-        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "samba" );
+        schema = loader.getSchema( "samba" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "samba" );
-        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "collective" );
+        schema = loader.getSchema( "collective" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "collective" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "java" );
+        schema = loader.getSchema( "java" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "java" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "dhcp" );
+        schema = loader.getSchema( "dhcp" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "dhcp" );
-        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "corba" );
+        schema = loader.getSchema( "corba" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "corba" );
-        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "nis" );
+        schema = loader.getSchema( "nis" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "nis" );
-        //assertTrue( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "inetorgperson" );
+        schema = loader.getSchema( "inetorgperson" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "inetorgperson" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "system" );
+        schema = loader.getSchema( "system" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "system" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
         
-        schema = schemas.get( "apachemeta" );
+        schema = loader.getSchema( "apachemeta" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "apachemeta" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
     }
-    
-    
-    @Test public void testGetSchemaNames() throws Exception
-    {
-        PartitionSchemaLoader loader = new PartitionSchemaLoader( schemaPartition, schemaManager
);
-        Set<String> schemaNames = loader.getSchemaNames();
-        assertTrue( schemaNames.contains( "mozilla" ) );
-        assertTrue( schemaNames.contains( "core" ) );
-        assertTrue( schemaNames.contains( "apachedns" ) );
-        assertTrue( schemaNames.contains( "autofs" ) );
-        assertTrue( schemaNames.contains( "apache" ) );
-        assertTrue( schemaNames.contains( "cosine" ) );
-        assertTrue( schemaNames.contains( "krb5kdc" ) );
-        assertTrue( schemaNames.contains( "samba" ) );
-        assertTrue( schemaNames.contains( "collective" ) );
-        assertTrue( schemaNames.contains( "java" ) );
-        assertTrue( schemaNames.contains( "dhcp" ) );
-        assertTrue( schemaNames.contains( "corba" ) );
-        assertTrue( schemaNames.contains( "nis" ) );
-        assertTrue( schemaNames.contains( "inetorgperson" ) );
-        assertTrue( schemaNames.contains( "system" ) );
-        assertTrue( schemaNames.contains( "apachemeta" ) );
-    }
 }

Modified: directory/apacheds/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/pom.xml?rev=957267&r1=957266&r2=957267&view=diff
==============================================================================
--- directory/apacheds/trunk/pom.xml (original)
+++ directory/apacheds/trunk/pom.xml Wed Jun 23 16:43:11 2010
@@ -122,7 +122,7 @@
     <module>protocol-changepw</module>
     <module>server-integ</module>
     <module>server-tools</module>
-    <module>default-config</module>
+    <module>server-config</module>
     <!--Uncomment to build all in one OSGi bundle-->
     <!--<module>osgi</module>-->
     <module>server-jndi</module>

Modified: directory/apacheds/trunk/server-config/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/pom.xml?rev=957267&r1=957179&r2=957267&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/pom.xml (original)
+++ directory/apacheds/trunk/server-config/pom.xml Wed Jun 23 16:43:11 2010
@@ -25,8 +25,8 @@
     <version>1.5.8-SNAPSHOT</version>
   </parent>
 
-  <artifactId>apacheds-default-config</artifactId>
-  <name>ApacheDS Default Config</name>
+  <artifactId>apacheds-config</artifactId>
+  <name>ApacheDS Server Config</name>
 
   <dependencies>
     <dependency>

Modified: directory/installers/trunk/apacheds-noarch/pom.xml
URL: http://svn.apache.org/viewvc/directory/installers/trunk/apacheds-noarch/pom.xml?rev=957267&r1=957266&r2=957267&view=diff
==============================================================================
--- directory/installers/trunk/apacheds-noarch/pom.xml (original)
+++ directory/installers/trunk/apacheds-noarch/pom.xml Wed Jun 23 16:43:11 2010
@@ -113,7 +113,7 @@
     </dependency>
 
     <dependency>
-      <artifactId>apacheds-default-config</artifactId>
+      <artifactId>apacheds-config</artifactId>
       <groupId>org.apache.directory.server</groupId>
       <version>${project.version}</version>
     </dependency>



Mime
View raw message