You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2009/05/17 11:36:53 UTC
svn commit: r775609 -
/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
Author: seelmann
Date: Sun May 17 09:36:53 2009
New Revision: 775609
URL: http://svn.apache.org/viewvc?rev=775609&view=rev
Log:
Added a test to check that no user attributes are present is attribute "1.1" is requested
Modified:
directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java?rev=775609&r1=775608&r2=775609&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java Sun May 17 09:36:53 2009
@@ -1543,4 +1543,33 @@
assertFalse( res.hasMore() );
}
+
+ /**
+ * Check if no user attributes are present, if "1.1" is requested.
+ */
+ @Test
+ public void testSearchUserAttributes_1_1() throws Exception
+ {
+ LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
+ SearchControls ctls = new SearchControls();
+
+ ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
+ ctls.setReturningAttributes( new String[]
+ { "1.1" } );
+
+ NamingEnumeration<SearchResult> result = ctx.search( HEATHER_RDN, FILTER, ctls );
+
+ if ( result.hasMore() )
+ {
+ SearchResult entry = result.next();
+ assertEquals( "No user attributes expected when requesting attribute 1.1", 0, entry.getAttributes().size() );
+ }
+ else
+ {
+ fail( "entry " + HEATHER_RDN + " not found" );
+ }
+
+ result.close();
+ }
+
}