saihemanth-cloudera commented on a change in pull request #1380:
URL: https://github.com/apache/hive/pull/1380#discussion_r499079676
##########
File path:
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/authorization/plugin/TestHiveAuthorizerCheckInvocation.java
##########
@@ -600,6 +600,22 @@ public void testReplDump() throws Exception {
assertEquals("table name", inDbTableName.toLowerCase(),
dbObj.getObjectName());
}
+ @Test
+ public void showTablesInDB() throws Exception{
+ final String tableName1 = "table1";
+ driver.run("create table " + dbName+"."+tableName1 + "(eid int, yoj int)");
+ final String tableName2 = "table2";
+ driver.run("create table " + dbName+"."+tableName2 + "(eid int, ecode
int)");
+ reset(mockedAuthorizer);
+
+ int status = driver.compile("show tables in "+dbName, true);
+ assertEquals(0, status);
+ Pair<List<HivePrivilegeObject>, List<HivePrivilegeObject>> io =
getHivePrivilegeObjectInputs();
+ List<HivePrivilegeObject> inputs = io.getLeft();
+ HivePrivilegeObject dbObj = inputs.get(0);
+ assertEquals("input type", HivePrivilegeObjectType.DATABASE,
dbObj.getType());
Review comment:
I have added the assert on owner info.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]