directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r695143 - in /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core: jndi/ operations/search/ suites/
Date Sun, 14 Sep 2008 08:41:09 GMT
Author: elecharny
Date: Sun Sep 14 01:41:08 2008
New Revision: 695143

URL: http://svn.apache.org/viewvc?rev=695143&view=rev
Log:
o Created a new package operations.search
o Moved the search operations to this new package
o Added a test for DIRSERVER-785 (broken filters)

Added:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/DIRSERVER759IT.java
      - copied, changed from r694905, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
      - copied, changed from r694905, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
      - copied, changed from r694905, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
Removed:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java?rev=695143&r1=695142&r2=695143&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/RFC2713IT.java
Sun Sep 14 01:41:08 2008
@@ -50,7 +50,7 @@
 
     @Test
     @SuppressWarnings("unchecked")
-    public void testSerializatin() throws Exception
+    public void testSerialization() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
 

Copied: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/DIRSERVER759IT.java
(from r694905, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/DIRSERVER759IT.java?p2=directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/DIRSERVER759IT.java&p1=directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java&r1=694905&r2=695143&rev=695143&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/DIRSERVER759IT.java
Sun Sep 14 01:41:08 2008
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.core.jndi;
+package org.apache.directory.server.core.operations.search;
 
 
 import org.apache.directory.server.core.DirectoryService;

Copied: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
(from r694905, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java?p2=directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java&p1=directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java&r1=694905&r2=695143&rev=695143&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
Sun Sep 14 01:41:08 2008
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.core.jndi;
+package org.apache.directory.server.core.operations.search;
 
 
 import org.apache.directory.server.core.DirectoryService;
@@ -46,6 +46,8 @@
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
+import javax.naming.directory.InvalidSearchControlsException;
+import javax.naming.directory.InvalidSearchFilterException;
 import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
@@ -1308,6 +1310,33 @@
 
 
     /**
+     * Test a search with a bad filter : there is a missing closing ')'
+     */
+    @Test
+    public void testBadFilter() throws Exception
+    {
+        LdapContext sysRoot = getSystemContext( service );
+        createData( sysRoot );
+
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
+        controls.setDerefLinkFlag( false );
+        sysRoot.addToEnvironment( JndiPropertyConstants.JNDI_LDAP_DAP_DEREF_ALIASES,
+                AliasDerefMode.NEVER_DEREF_ALIASES.getJndiValue() );
+        
+        try
+        {
+            sysRoot.search( "", "(|(name=testing00)(name=testing01)", controls );
+            fail();
+        }
+        catch ( InvalidSearchFilterException isfe )
+        {
+            assertTrue( true );
+        }
+    }
+
+
+    /**
      * Search operation with a base DN with quotes
      * Commented as it's not valid by RFC 5514
     @Test

Copied: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
(from r694905, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java?p2=directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java&p1=directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java&r1=694905&r2=695143&rev=695143&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
Sun Sep 14 01:41:08 2008
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.core.jndi;
+package org.apache.directory.server.core.operations.search;
 
 
 import org.apache.directory.server.core.DefaultDirectoryService;

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java?rev=695143&r1=695142&r2=695143&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
Sun Sep 14 01:41:08 2008
@@ -31,7 +31,6 @@
 import org.apache.directory.server.core.jndi.AddIT;
 import org.apache.directory.server.core.jndi.CreateContextIT;
 import org.apache.directory.server.core.jndi.DIRSERVER169IT;
-import org.apache.directory.server.core.jndi.DIRSERVER759IT;
 import org.apache.directory.server.core.jndi.DIRSERVER783IT;
 import org.apache.directory.server.core.jndi.DIRSERVER791IT;
 import org.apache.directory.server.core.jndi.DestroyContextIT;
@@ -41,10 +40,11 @@
 import org.apache.directory.server.core.jndi.ObjStateFactoryIT;
 import org.apache.directory.server.core.jndi.RFC2713IT;
 import org.apache.directory.server.core.jndi.RootDSEIT;
-import org.apache.directory.server.core.jndi.SearchIT;
 import org.apache.directory.server.core.jndi.UniqueMemberIT;
 import org.apache.directory.server.core.normalization.NormalizationServiceIT;
 import org.apache.directory.server.core.operational.OperationalAttributeServiceIT;
+import org.apache.directory.server.core.operations.search.DIRSERVER759IT;
+import org.apache.directory.server.core.operations.search.SearchIT;
 import org.apache.directory.server.core.prefs.PreferencesIT;
 import org.apache.directory.server.core.sp.LdapClassLoaderIT;
 import org.apache.directory.server.core.subtree.BadSubentryServiceIT;



Mime
View raw message