----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61783/#review183542 -----------------------------------------------------------
hive-agent/src/test/java/org/apache/ranger/services/hive/HIVERangerAuthorizerTest.java Lines 334 (patched) <https://reviews.apache.org/r/61783/#comment259547> - I am not able to apply this patch on master. please rebase it to latest code and update this review patch. - Also please remove the unnecessary whitespace in the HIVERangerAuthorizerTest.java code which shows up in RED bars in the review. - Ramesh Mani On Aug. 21, 2017, 3:04 p.m., Endre Zoltan Kovacs wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61783/ > ----------------------------------------------------------- > > (Updated Aug. 21, 2017, 3:04 p.m.) > > > Review request for ranger. > > > Bugs: RANGER-1631 > https://issues.apache.org/jira/browse/RANGER-1631 > > > Repository: ranger > > > Description > ------- > > added unit test for RANGER-1631 > > > Diffs > ----- > > > hive-agent/src/test/java/org/apache/ranger/services/hive/HIVERangerAuthorizerTest.java > 2c9e9552 > hive-agent/src/test/resources/hive-policies.json 41a4e203 > > > Diff: https://reviews.apache.org/r/61783/diff/1/ > > > Testing > ------- > > added unit test to cover use case of: > RANGER-1631: create temp function failing with permission issues > (2e193e124399cf685c17798b8243e1d62f223315) > > My unit test creates a database test1. > Creates a UDF for test1. > Creates a temporary UDF (which is not bound to any database) > Asserts for the presence of these 2 UDFs. > > The test case includes: 1 Junit test method in > hive-agent/src/test/java/org/apache/ranger/services/hive/HIVERangerAuthorizerTest.java > > and a new User called: tom in the policies file: > hive-agent/src/test/resources/hive-policies.json > > tom has Ranger policies to: > - create/read/update/delete databases > - create/read/update/delete UDF on test1 database > > > this unit test WILL fail when commit 2e193e124399cf685c17798b8243e1d62f223315 > is not present / reverted > (HiveAccessControlException: Permission denied: user [tom] does not have > [CREATE] privilege on [tmp]) > , and it will pass when that commit is present. > > > To run this test: > cd ranger/hive-agent > mvn test -Dtest=HIVERangerAuthorizerTest#testHiveUdfCreateOnWildcardDatabase > > To run this test alongside with its siblings: > cd ranger/hive-agent > mvn test -Dtest=HIVERangerAuthorizerTest > > > Thanks, > > Endre Zoltan Kovacs > >
