You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Eirik Bjørsnøs <ei...@gmail.com> on 2009/10/30 10:52:18 UTC

Disabling schema checking

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.

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

Did any work get done on this? Or is there some easier way to disable checks?

Thanks,
Eirik.

Re: Disabling schema checking

Posted by Emmanuel Lecharny <el...@apache.org>.
Eirik Bjørsnøs wrote:
>> 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 ?
>>     
>
> Fedora Directory Server with some knobs turned  to disable certain
> schema checks.
>   
I guess you can't make the schema working without disabling some 
checks... Which cheks are you disabling ?

(we may add some of the checks disabled as we are very picky with all 
the consistence checks atm, and that may be overkilling)
> Eirik.
>
>   


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



Re: Disabling schema checking

Posted by Eirik Bjørsnøs <ei...@gmail.com>.
> 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 ?

Fedora Directory Server with some knobs turned  to disable certain
schema checks.

Eirik.

Re: Disabling schema checking

Posted by Emmanuel Lecharny <el...@apache.org>.
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