directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1723924 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddIT.java
Date Sun, 10 Jan 2016 13:37:40 GMT
Author: seelmann
Date: Sun Jan 10 13:37:40 2016
New Revision: 1723924

URL: http://svn.apache.org/viewvc?rev=1723924&view=rev
Log:
More tests to demonstrate DIRSERVER-2109

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddIT.java?rev=1723924&r1=1723923&r2=1723924&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddIT.java
Sun Jan 10 13:37:40 2016
@@ -35,6 +35,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -136,4 +137,51 @@ public class AddIT extends AbstractLdapT
 
         assertEquals( "2147483648", entry.get( "ads-dsSyncPeriodMillis" ).getString() );
     }
+
+
+    /**
+     * Test for DIRSERVER-2109.
+     */
+    @Test
+    @Ignore
+    public void test_DIRSERVER_2109_1() throws Exception
+    {
+        Dn dn = new Dn( "cn=\\#\\\\\\+\\, \\\"\u00F6\u00E9\\\",ou=users,ou=system" );
+        Entry entry = new DefaultEntry( dn,
+            "objectClass: top",
+            "objectClass: person",
+            "sn:  #\\+, \"\u00F6\u00E9\"    ",
+            "cn: #\\+, \"\u00F6\u00E9\"" );
+
+        LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
+        connection.add( entry );
+
+        entry = connection.lookup( entry.getDn(), SchemaConstants.ALL_USER_ATTRIBUTES );
+        System.out.println( entry );
+        assertEquals( 1, entry.get( "cn" ).size() );
+        assertEquals( "#\\+, \"\u00F6\u00E9\"", entry.get( "cn" ).get().getString() );
+    }
+
+
+    /**
+     * Test for DIRSERVER-2109.
+     */
+    @Test
+    @Ignore
+    public void test_DIRSERVER_2109_2() throws Exception
+    {
+        Entry entry = new DefaultEntry( new Dn( "cn=a\\\\b,ou=users,ou=system" ) );
+        entry.add( "objectClass", "top", "person" );
+        entry.add( "cn", "a\\b" );
+        entry.add( "sn", "test" );
+
+        LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
+        connection.add( entry );
+
+        entry = connection.lookup( entry.getDn(), SchemaConstants.ALL_USER_ATTRIBUTES );
+        System.out.println( entry );
+        assertEquals( 1, entry.get( "cn" ).size() );
+        assertEquals( "a\\b", entry.get( "cn" ).get().getString() );
+    }
+
 }



Mime
View raw message