incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1206173 - in /incubator/accumulo/branches/1.4: ./ src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
Date Fri, 25 Nov 2011 13:55:38 GMT
Author: ecn
Date: Fri Nov 25 13:55:38 2011
New Revision: 1206173

URL: http://svn.apache.org/viewvc?rev=1206173&view=rev
Log:
ACCUMULO-172 merge from 1.3 branch

Modified:
    incubator/accumulo/branches/1.4/   (props changed)
    incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java

Propchange: incubator/accumulo/branches/1.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 25 13:55:38 2011
@@ -1,3 +1,3 @@
-/incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880
+/incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169
 /incubator/accumulo/branches/1.4:1205476
 /incubator/accumulo/trunk:1205476,1205570

Modified: incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java?rev=1206173&r1=1206172&r2=1206173&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
(original)
+++ incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
Fri Nov 25 13:55:38 2011
@@ -40,6 +40,7 @@ import org.apache.accumulo.core.data.Val
 import org.apache.accumulo.core.iterators.Combiner;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.user.SummingCombiner;
+import org.apache.accumulo.core.security.Authorizations;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
 
@@ -77,6 +78,16 @@ public class MockConnectorTest {
   }
   
   @Test
+  public void testChangeAuths() throws Exception {
+    Connector c = new MockConnector("root");
+    c.securityOperations().createUser("greg", new byte[] {}, new Authorizations("A", "B",
"C"));
+    assertTrue(c.securityOperations().getUserAuthorizations("greg").contains("A".getBytes()));
+    c.securityOperations().changeUserAuthorizations("greg", new Authorizations("X", "Y",
"Z"));
+    assertTrue(c.securityOperations().getUserAuthorizations("greg").contains("X".getBytes()));
+    assertFalse(c.securityOperations().getUserAuthorizations("greg").contains("A".getBytes()));
+  }
+  
+  @Test
   public void testAggregation() throws Exception {
     MockInstance mockInstance = new MockInstance();
     Connector c = mockInstance.getConnector("root", new byte[] {});



Mime
View raw message