> On Aug. 22, 2017, 10:21 p.m., Ramesh Mani wrote:
> > hive-agent/src/test/java/org/apache/ranger/services/hive/HIVERangerAuthorizerTest.java
> > Lines 334 (patched)
> > <https://reviews.apache.org/r/61783/diff/1/?file=1800760#file1800760line334>
> >
> >     - 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.
> 
> Endre Zoltan Kovacs wrote:
>     i checked an the patch is still is based on the head of the master branch.
>     What i found is that applying the patch needs an additional flag.
>     
>     When applying the patch, please use:
>     hive-agent as the base directory for the patch. Then it should apply 
> cleanly. (it is needed, even though the patch created as described in: 
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=55151244)
>     
>     git apply --directory=hive-agent/ 
> 0001-RANGER-1631-added-unit-test-for-UDF-creation-with-da.patch
>     
>     white spaces are corrected now in this patch.

please let me know if you need any additional input with this.
Thanks
Endre


- Endre Zoltan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61783/#review183542
-----------------------------------------------------------


On Aug. 23, 2017, 10:57 a.m., Endre Zoltan Kovacs wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61783/
> -----------------------------------------------------------
> 
> (Updated Aug. 23, 2017, 10:57 a.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/2/
> 
> 
> 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
> 
>

Reply via email to