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


Ship it!




Ship It!

- bhavik patel


On March 2, 2022, 10:32 a.m., Kirby Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73879/
> -----------------------------------------------------------
> 
> (Updated March 2, 2022, 10:32 a.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-3650
>     https://issues.apache.org/jira/browse/RANGER-3650
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> The old commit is buggy and meaningless.
>  
> * testBlockAuditorRoleUserThrowsErrorForAuditKeyAdmin
> * testBlockAuditorRoleUserThrowsErrorForAuditUserAdmin
> * testBlockAuditorRoleUserSuccess
> 
> The 3 tests should test behavior of RangerBizUtil::blockAuditorRoleUser.
> But it constructs a mocked RangerBizUtil, and stub blockAuditorRoleUser. The 
> real RangerBizUtil::blockAuditorRoleUser is never being tested.
> 
> These @Mock annotated class members are invalid.
> 
> * currentUserSession
> * vXResponse 
> * context
> * contextUtil
> 
> These members are not member of RangerBizUtil, so can not be injected into 
> rangerBizUtil, we should not use it as class member.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/test/java/org/apache/ranger/biz/TestRangerBizUtil.java 
> 22e290a666deaac42fc0106302abd151e135bd47 
> 
> 
> Diff: https://reviews.apache.org/r/73879/diff/2/
> 
> 
> Testing
> -------
> 
> mvn test
> 
> 
> Thanks,
> 
> Kirby Zhou
> 
>

Reply via email to