You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2006/11/29 21:26:17 UTC
svn commit: r480707 -
/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
Author: ersiner
Date: Wed Nov 29 12:26:16 2006
New Revision: 480707
URL: http://svn.apache.org/viewvc?view=rev&rev=480707
Log:
Making sure that Subentries are visible upon Base Scope Searches with using the Subentry Control.
Modified:
directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java?view=diff&rev=480707&r1=480706&r2=480707
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java Wed Nov 29 12:26:16 2006
@@ -861,4 +861,22 @@
assertFalse( list.hasMore() );
assertEquals( "cn=testsubentry,ou=system", result.getName() );
}
+
+ public void testBaseScopeSearchSubentryVisibilityWithoutTheControl() throws Exception
+ {
+ addAdministrativeRole( "collectiveArributeSpecificArea" );
+ super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentryWithExclusion() );
+ SearchControls searchControls = new SearchControls();
+ searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );
+
+ Map entries = new HashMap();
+ NamingEnumeration list = super.sysRoot.search( "cn=testsubentry", "(objectClass=subentry)", searchControls );
+ while ( list.hasMore() )
+ {
+ SearchResult result = ( SearchResult ) list.next();
+ entries.put( result.getName(), result );
+ }
+ assertEquals( 1, entries.size() );
+ assertNotNull( entries.get( "cn=testsubentry,ou=system" ) );
+ }
}
Re: svn commit: r480707 - /directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
Posted by Ersin Er <er...@gmail.com>.
I just have to correct the commit log below
On 11/29/06, ersiner@apache.org <er...@apache.org> wrote:
> Author: ersiner
> Date: Wed Nov 29 12:26:16 2006
> New Revision: 480707
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=480707
> Log:
> Making sure that Subentries are visible upon Base Scope Searches with using the Subentry Control.
s/with/without/
That really matters ;-)
> Modified:
> directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
>
> Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
> URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java?view=diff&rev=480707&r1=480706&r2=480707
> ==============================================================================
> --- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java (original)
> +++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java Wed Nov 29 12:26:16 2006
> @@ -861,4 +861,22 @@
> assertFalse( list.hasMore() );
> assertEquals( "cn=testsubentry,ou=system", result.getName() );
> }
> +
> + public void testBaseScopeSearchSubentryVisibilityWithoutTheControl() throws Exception
> + {
> + addAdministrativeRole( "collectiveArributeSpecificArea" );
> + super.sysRoot.createSubcontext( "cn=testsubentry", getTestSubentryWithExclusion() );
> + SearchControls searchControls = new SearchControls();
> + searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );
> +
> + Map entries = new HashMap();
> + NamingEnumeration list = super.sysRoot.search( "cn=testsubentry", "(objectClass=subentry)", searchControls );
> + while ( list.hasMore() )
> + {
> + SearchResult result = ( SearchResult ) list.next();
> + entries.put( result.getName(), result );
> + }
> + assertEquals( 1, entries.size() );
> + assertNotNull( entries.get( "cn=testsubentry,ou=system" ) );
> + }
> }
>
>
>
--
Ersin