directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: Disabling schema checking
Date Fri, 30 Oct 2009 13:11:04 GMT
Eirik Bjørsnøs wrote:
> Hi,
>
> I'm trying to rewrite some JUnit tests running agains an external LDAP
> server to use Apache DS instead.
>
> The old server has certain schema checks disabled. I'd like to disable
> schema checking in ApacheDS as well since the alternative would
> involve rewriting a lot of code.
>
> My first approch was to disable the SchemaInterceptor as described in
> this thread:
>
>  http://markmail.org/thread/72gxj37arygooama
>
> However, this seems to break my code that adds custom attributes and
> objectclasses. It fails with a NameNotFoundException ("Cannot find a
> partition for 2.5.4.3=schema"). So it seems that the SchemaInterceptor
> is responsible for more that just enforcing rules when modifying the
> directory.
>   
Yeah. The Schema Interceptor is probably one of the essential part of 
the server, and removing it is probably like removing the engine in a 
car. It will simply won't work anymore.

> In that thread Alex also mentioned plans for rewriting the
> SchemaInterceptor so that it would be easier to just disable
> enforcement of rules:
>
> http://markmail.org/message/i4mud4i3yqz5n6uo
>   
We are currently refactoring the whole schema handling, but we won't 
relax the schema checks.

The only way to go if you are using Unit tests is to define a schema 
which fits your need. It's a lot of work, but I see no other way.

What server are your tests based on ?

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Mime
View raw message