directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1053131 - /directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java
Date Mon, 27 Dec 2010 18:38:00 GMT
Author: elecharny
Date: Mon Dec 27 18:37:59 2010
New Revision: 1053131

URL: http://svn.apache.org/viewvc?rev=1053131&view=rev
Log:
Fixed the test which added some IAP without an AAP

Modified:
    directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java

Modified: directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java?rev=1053131&r1=1053130&r2=1053131&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryAddOperationIT.java
Mon Dec 27 18:37:59 2010
@@ -452,7 +452,7 @@ public class SubentryAddOperationIT exte
             "administrativeRole: autonomousArea"
             );
 
-        // It should fail
+        // It should succeed
         AddResponse response = adminConnection.add( autonomousArea );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
@@ -556,19 +556,34 @@ public class SubentryAddOperationIT exte
     public void testAddInnerAreas() throws Exception
     {
         Entry autonomousArea = LdifUtils.createEntry( 
-            "ou=autonomousArea, ou=system", 
+            "ou=AAP,ou=system", 
             "ObjectClass: top",
             "ObjectClass: organizationalUnit", 
-            "ou: autonomousArea", 
+            "ou: AAP", 
+            "administrativeRole: accessControlSpecificArea",
+            "administrativeRole: autonomousArea"
+            );
+
+        // It should succeed
+        AddResponse response = adminConnection.add( autonomousArea );
+
+        assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
+        
+        // Now add the IAPs
+        Entry innerAreas = LdifUtils.createEntry( 
+            "ou=innerAreas, ou=AAP,ou=system", 
+            "ObjectClass: top",
+            "ObjectClass: organizationalUnit", 
+            "ou: innerAreas", 
             "administrativeRole: accessControlINNERArea",
             "administrativeRole: TRIGGEREXECUTIONINNERAREA" );
 
-        AddResponse response = adminConnection.add( autonomousArea );
+        response = adminConnection.add( innerAreas );
 
         assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
 
         // Check that the entry is containing all the roles
-        Entry entry = getAdminRole( "ou=autonomousArea, ou=system" );
+        Entry entry = getAdminRole( "ou=innerAreas, ou=AAP,ou=system" );
 
         assertFalse( entry.contains( "administrativeRole", "autonomousArea" ) );
         assertTrue( entry.contains( "administrativeRole", "accessControlInnerArea" ) );



Mime
View raw message