You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by bp...@apache.org on 2022/03/25 07:32:35 UTC

[ranger] branch master updated: RANGER-3678: Update Test-cases

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

bpatel 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 3616be5  RANGER-3678: Update Test-cases
3616be5 is described below

commit 3616be52fe0ba8d68b3ec724f4cd3042d34d9aee
Author: Patel <bh...@visa.com>
AuthorDate: Fri Mar 25 12:45:19 2022 +0530

    RANGER-3678: Update Test-cases
---
 .../src/test/java/org/apache/ranger/biz/TestXUserMgr.java           | 6 +++---
 .../src/test/java/org/apache/ranger/common/TestStringUtil.java      | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/security-admin/src/test/java/org/apache/ranger/biz/TestXUserMgr.java b/security-admin/src/test/java/org/apache/ranger/biz/TestXUserMgr.java
index 3d7e133..5ebd42e 100644
--- a/security-admin/src/test/java/org/apache/ranger/biz/TestXUserMgr.java
+++ b/security-admin/src/test/java/org/apache/ranger/biz/TestXUserMgr.java
@@ -268,7 +268,7 @@ public class TestXUserMgr {
 		vxUser.setName(userLoginID);
 		vxUser.setUserRoleList(userRoleList);
 		vxUser.setGroupNameList(groupNameList);
-		vxUser.setPassword("usertest123");
+		vxUser.setPassword("Usertest123");
 		vxUser.setEmailAddress("test@test.com");
 		return vxUser;
 	}
@@ -344,7 +344,7 @@ public class TestXUserMgr {
 		userProfile.setFirstName("user12");
 		userProfile.setLastName("test12");
 		userProfile.setLoginId(userLoginID);
-		userProfile.setPassword("usertest123");
+		userProfile.setPassword("Usertest123");
 		userProfile.setUserSource(1);
 		userProfile.setPublicScreenName("testuser");
 		userProfile.setId(userId);
@@ -2812,7 +2812,7 @@ public class TestXUserMgr {
 		setup();
 		VXUser vxUser = vxUser();
 		vxUser.setPassword("password");
-		Mockito.when(restErrorUtil.createRESTException("serverMsg.xuserMgrValidatePassword", MessageEnums.INVALID_PASSWORD, null, "Password should be minimum 8 characters, at least one uppercase letter, one lowercase letter and one numeric", null)).thenThrow(new WebApplicationException());
+		Mockito.when(restErrorUtil.createRESTException("serverMsg.xuserMgrValidatePassword", MessageEnums.INVALID_PASSWORD, null, "Password should be minimum 8 characters, at least one uppercase letter, one lowercase letter and one numeric.", null)).thenThrow(new WebApplicationException());
 		thrown.expect(WebApplicationException.class);
 		xUserMgr.validatePassword(vxUser);
 	}
diff --git a/security-admin/src/test/java/org/apache/ranger/common/TestStringUtil.java b/security-admin/src/test/java/org/apache/ranger/common/TestStringUtil.java
index 7fed916..5514b14 100644
--- a/security-admin/src/test/java/org/apache/ranger/common/TestStringUtil.java
+++ b/security-admin/src/test/java/org/apache/ranger/common/TestStringUtil.java
@@ -45,7 +45,7 @@ public class TestStringUtil {
 	
 	@Test
 	public void testValidatePassword(){
-		String password="aa1234ddas12";
+		String password="Aa1234ddas12";
 		String[] invalidValues={"aa","bb","aa12345dd"};
 		boolean value=stringUtil.validatePassword(password, invalidValues);
 		Assert.assertTrue(password.length() >= 8);