Author: seelmann
Date: Sun Jan 24 22:16:47 2010
New Revision: 902665
URL: http://svn.apache.org/viewvc?rev=902665&view=rev
Log:
Fixed schema search test
Modified:
directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java?rev=902665&r1=902664&r2=902665&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
Sun Jan 24 22:16:47 2010
@@ -175,6 +175,7 @@
}
// This is a Schema
+ // e.g. ou=my custom schema,ou=schema
if ( oc.contains( MetaSchemaConstants.META_SCHEMA_OC ) )
{
ServerEntry entry = opContext.getEntry();
@@ -182,7 +183,8 @@
return;
}
- // What is this for ??? TODO : remove this code if it's useless...
+ // Check if it is a valid container for AT, C, DCR, DSR, MR, MRU, NF, N, OC, S, SC
+ // e.g. ou=attributeTypes,ou=my custom schema,ou=schema
if ( oc.contains( SchemaConstants.ORGANIZATIONAL_UNIT_OC ) )
{
if ( opContext.getDn().size() != 3 )
@@ -201,6 +203,9 @@
LOG.error( msg );
throw new LdapInvalidNameException( msg, ResultCodeEnum.NAMING_VIOLATION
);
}
+
+ // this is a valid container.
+ return;
}
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java?rev=902665&r1=902664&r2=902665&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
Sun Jan 24 22:16:47 2010
@@ -34,6 +34,8 @@
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
import org.apache.directory.server.core.annotations.ApplyLdifs;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
@@ -48,7 +50,12 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev: 569048 $
*/
-@RunWith ( FrameworkRunner.class )
+@RunWith ( FrameworkRunner.class )
+@CreateLdapServer (
+ transports =
+ {
+ @CreateTransport( protocol = "LDAP" )
+ })
@ApplyLdifs( {
// Bogus AD schema (not real)
|