directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r377912 - /directory/sandbox/akarasulu/rc1/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
Date Wed, 15 Feb 2006 01:32:48 GMT
Author: elecharny
Date: Tue Feb 14 17:32:44 2006
New Revision: 377912

URL: http://svn.apache.org/viewcvs?rev=377912&view=rev
Log:
Added a test of a bad DN in partition (test for DIRSERVER-578)

Modified:
    directory/sandbox/akarasulu/rc1/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java

Modified: directory/sandbox/akarasulu/rc1/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java?rev=377912&r1=377911&r2=377912&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
(original)
+++ directory/sandbox/akarasulu/rc1/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
Tue Feb 14 17:32:44 2006
@@ -30,6 +30,7 @@
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 
+import org.apache.directory.server.core.configuration.ConfigurationException;
 import org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 
@@ -274,5 +275,26 @@
         assertTrue( attribute.contains( "top" ) );
 
         assertTrue( attribute.contains( "domain" ) );
+    }
+
+    public void testBadPartition() throws Exception
+    {
+        MutableDirectoryPartitionConfiguration pcfg;
+
+        // Add partition 'test=testing'
+        pcfg = new MutableDirectoryPartitionConfiguration();
+        pcfg.setName( "testing" );
+        
+        try
+        {
+            pcfg.setSuffix( "ou=test=testing" );
+        }
+        catch ( ConfigurationException ce )
+        {
+            assertTrue( true );
+            return;
+        }
+        
+        fail();
     }
 }



Mime
View raw message