You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ab...@apache.org on 2021/01/09 00:40:23 UTC

[ranger] branch master updated: Fixed PMD violations

This is an automated email from the ASF dual-hosted git repository.

abhay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e3b74d  Fixed PMD violations
4e3b74d is described below

commit 4e3b74da48dd3c586a22b93c91101de288e3bce1
Author: Abhay Kulkarni <ab...@apache.org>
AuthorDate: Fri Jan 8 16:40:06 2021 -0800

    Fixed PMD violations
---
 .../src/test/java/org/apache/ranger/rest/TestServiceREST.java         | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java b/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java
index 59cf22d..09d3bea 100644
--- a/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java
+++ b/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java
@@ -58,7 +58,6 @@ import org.apache.ranger.db.RangerDaoManager;
 import org.apache.ranger.db.XXSecurityZoneDao;
 import org.apache.ranger.db.XXSecurityZoneRefServiceDao;
 import org.apache.ranger.db.XXSecurityZoneRefTagServiceDao;
-import org.apache.ranger.db.XXGroupUserDao;
 import org.apache.ranger.db.XXServiceDao;
 import org.apache.ranger.db.XXServiceDefDao;
 import org.apache.ranger.entity.XXPortalUser;
@@ -1078,7 +1077,6 @@ public class TestServiceREST {
 		SearchFilter filter = new SearchFilter();
 		XXService xs = Mockito.mock(XXService.class);
 		xs.setType(3L);
-		XXGroupUserDao xGroupDao = Mockito.mock(XXGroupUserDao.class);
 		ServiceREST spySVCRest = Mockito.spy(serviceREST);
 		List<RangerPolicy> policies = new ArrayList<RangerPolicy>();
 		ServicePolicies svcPolicies = new ServicePolicies();
@@ -1091,9 +1089,7 @@ public class TestServiceREST {
 		Mockito.when(searchUtil.getSearchFilter(request, policyService.sortFields)).thenReturn(filter);
 		Mockito.when(svcStore.getPolicies(filter)).thenReturn(policies);
 		/*here we are setting serviceAdminRole, so we will get the required policy with serviceAdmi role*/
-		//Mockito.when(daoManager.getXXGroupUser()).thenReturn(xGroupDao);
 		Mockito.when(svcStore.isServiceAdminUser(rPol.getService(), null)).thenReturn(true);
-		//Mockito.doReturn(policyAdmin).when(spySVCRest).getPolicyAdminForDelegatedAdmin("HDFS_1-1-20150316062453");
 		RangerPolicyList dbRangerPolicy = spySVCRest.getPolicies(request);
 		Assert.assertNotNull(dbRangerPolicy);
 		Assert.assertEquals(dbRangerPolicy.getListSize(), 1);