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

bpatel pushed a commit to branch ranger-2.3
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/ranger-2.3 by this push:
     new 73918f7  RANGER-3678: Update Test-cases
73918f7 is described below

commit 73918f78fa7724ba988903026bd552d5836b4d68
Author: Bhavik Patel <[email protected]>
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 3b5ec02..b414dce 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
@@ -246,7 +246,7 @@ public class TestXUserMgr {
                vxUser.setName(userLoginID);
                vxUser.setUserRoleList(userRoleList);
                vxUser.setGroupNameList(groupNameList);
-               vxUser.setPassword("usertest123");
+               vxUser.setPassword("Usertest123");
                vxUser.setEmailAddress("[email protected]");
                return vxUser;
        }
@@ -322,7 +322,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);
@@ -2708,7 +2708,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);

Reply via email to