Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0, 2.3.0
-
None
-
None
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.
New Patch is here https://reviews.apache.org/r/73879/