directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r955967 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
Date Fri, 18 Jun 2010 12:22:28 GMT
Author: elecharny
Date: Fri Jun 18 12:22:28 2010
New Revision: 955967

URL: http://svn.apache.org/viewvc?rev=955967&view=rev
Log:
Added a test to demonstrate that DIRSERVER-1285 has been fixed

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java?rev=955967&r1=955966&r2=955967&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
Fri Jun 18 12:22:28 2010
@@ -45,12 +45,17 @@ import netscape.ldap.LDAPException;
 import netscape.ldap.LDAPSearchResults;
 import netscape.ldap.LDAPUrl;
 
+import org.apache.directory.ldap.client.api.LdapConnection;
+import org.apache.directory.ldap.client.api.LdapNetworkConnection;
+import org.apache.directory.ldap.client.api.message.BindResponse;
+import org.apache.directory.ldap.client.api.message.LdapResult;
 import org.apache.directory.server.annotations.CreateLdapServer;
 import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -436,4 +441,20 @@ public class SimpleBindIT extends Abstra
             ldapServer.getDirectoryService().setAllowAnonymousAccess( oldValue );
         }
     }
+
+    
+    /**
+     * Tests bind operation on referral entry.
+     */
+    @Test
+    public void testBindWithDoubleQuote() throws Exception
+    {
+        LdapConnection connection = new LdapNetworkConnection( "localhost", ldapServer.getPort()
);
+        
+        BindResponse response = connection.bind( "uid=\"admin\",ou=\"system\"", "secret"
);
+        LdapResult ldapResult = response.getLdapResult();
+        assertEquals( ResultCodeEnum.SUCCESS, ldapResult.getResultCode() );
+        assertEquals( 1, response.getMessageId() );
+        assertTrue( connection.isAuthenticated() );
+    }
 }



Mime
View raw message