iaorekhov-1980 commented on code in PR #61440:
URL: https://github.com/apache/doris/pull/61440#discussion_r3691660695


##########
fe/fe-core/src/test/java/org/apache/doris/mysql/authenticate/ldap/LdapManagerTest.java:
##########
@@ -108,6 +115,32 @@ public void testCheckUserPasswd() {
         Assert.assertFalse(ldapManager.checkUserPasswd(USER2, "123"));
     }
 
+    @Test
+    public void testUserLoginWithEmptyLDAPPasswordDefault() {
+        LdapManager ldapManager = new LdapManager();
+        
Assert.assertTrue(ldapManager.checkLoginWithEmptyPasswordForLdapIsAllowed("username",
 null));

Review Comment:
   Hello, 
   Thanks for notice!
   I've completely re-written the test methods related to the introduced 
feature.
   Some of them are based on the existing approach and test potential cases 
with empty and valid LDAP password depending on the value of 
ldap_allow_empty_pass property,
   But I've also introduced new tests, based on Mockito features, which 
explicitly verifies, that correct sequence of methods in invoked within 
LDAPManager.checkUserPasswd depending on actual value of LDAP password and 
current value of ldap_allow_empty_pass property.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to