jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1470479 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java
Date Mon, 22 Apr 2013 12:40:50 GMT
Author: angela
Date: Mon Apr 22 12:40:49 2013
New Revision: 1470479

URL: http://svn.apache.org/r1470479
Log:
OAK-51 : Access Control Management (mark test that shows OAK-787 as ignored, revert changes
made to other tests)

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java?rev=1470479&r1=1470478&r2=1470479&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImplTest.java
Mon Apr 22 12:40:49 2013
@@ -37,7 +37,6 @@ import javax.jcr.security.AccessControlE
 import javax.jcr.security.AccessControlManager;
 import javax.jcr.security.AccessControlPolicy;
 import javax.jcr.security.AccessControlPolicyIterator;
-import javax.jcr.security.NamedAccessControlPolicy;
 import javax.jcr.security.Privilege;
 
 import com.google.common.collect.ImmutableMap;
@@ -889,14 +888,14 @@ public class AccessControlManagerImplTes
 
         AccessControlPolicy[] policies = acMgr.getPolicies(path);
         assertNotNull(policies);
-        assertEquals(1, policies.length);
+        assertEquals(0, policies.length);
 
         acMgr.setPolicy(null, acMgr.getApplicablePolicies(path).nextAccessControlPolicy());
         assertFalse(acMgr.getApplicablePolicies(path).hasNext());
 
         policies = acMgr.getPolicies(path);
         assertNotNull(policies);
-        assertEquals(2, policies.length);
+        assertEquals(1, policies.length);
 
         assertTrue(policies[0] instanceof ACL);
         ACL acl = (ACL) policies[0];
@@ -905,11 +904,8 @@ public class AccessControlManagerImplTes
         assertNull(acl.getOakPath());
         assertFalse(acMgr.getApplicablePolicies(path).hasNext());
 
-        assertTrue(policies[1] instanceof NamedAccessControlPolicy);
-
         acMgr.removePolicy(path, acl);
-        assertEquals(1, acMgr.getPolicies(path).length);
-        assertTrue(acMgr.getPolicies(path)[0] instanceof NamedAccessControlPolicy);
+        assertEquals(0, acMgr.getPolicies(path).length);
         assertTrue(acMgr.getApplicablePolicies(path).hasNext());
     }
 
@@ -1037,7 +1033,7 @@ public class AccessControlManagerImplTes
 
         Root root2 = adminSession.getLatestRoot();
         AccessControlPolicy[] policies = getAccessControlManager(root2).getPolicies((String)
null);
-        assertEquals(2, policies.length);
+        assertEquals(1, policies.length);
         assertArrayEquals(acl.getAccessControlEntries(), ((ACL) policies[0]).getAccessControlEntries());
     }
 
@@ -1228,7 +1224,7 @@ public class AccessControlManagerImplTes
 
         acMgr.removePolicy(null, acl);
 
-        assertEquals(1, acMgr.getPolicies((String) null).length);
+        assertEquals(0, acMgr.getPolicies((String) null).length);
         assertTrue(acMgr.getApplicablePolicies((String) null).hasNext());
     }
 



Mime
View raw message