virajjasani commented on a change in pull request #2809:
URL: https://github.com/apache/hbase/pull/2809#discussion_r548946432
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
##########
@@ -379,6 +381,36 @@ public void testUnauthorizedStopMaster() throws Exception {
USER_GROUP_WRITE, USER_GROUP_CREATE);
}
+ @Test
+ public void testUnauthorizedSetTableStateInMeta() throws Exception {
+ AccessTestAction action = new AccessTestAction() {
+ @Override public Object run() throws Exception {
Review comment:
Let's use lambda here?
```
AccessTestAction action = () -> {
...
...
...
return null;
};
```
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java
##########
@@ -379,6 +381,36 @@ public void testUnauthorizedStopMaster() throws Exception {
USER_GROUP_WRITE, USER_GROUP_CREATE);
}
+ @Test
+ public void testUnauthorizedSetTableStateInMeta() throws Exception {
+ AccessTestAction action = new AccessTestAction() {
+ @Override public Object run() throws Exception {
+ Connection conn =
ConnectionFactory.createConnection(TEST_UTIL.getConfiguration()) ;
+ Hbck hbck = conn.getHbck();
+ hbck.setTableStateInMeta(new TableState(TEST_TABLE,
TableState.State.DISABLED));
+ return null;
+ }
+ };
+
+ verifyDenied(action, USER_CREATE, USER_OWNER, USER_RW, USER_RO, USER_NONE,
USER_GROUP_READ,
+ USER_GROUP_WRITE, USER_GROUP_CREATE);
+ }
+
+ @Test
+ public void testUnauthorizedFixMeta() throws Exception {
+ AccessTestAction action = new AccessTestAction() {
+ @Override public Object run() throws Exception {
Review comment:
Same here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]