@@ -356,19 +356,21 @@ def test_authentication
356356 assert_match ( /WRONGPASS invalid username-password pair/ , error . message )
357357
358358 # Correct password, but user disabled
359- backup . call ( "ACL" , "SETUSER" , "AzureDiamond" , "<hunter2" , ">trolilol" , "off" )
359+ @redis . call ( "ACL" , "DELUSER" , "AnotherUser" )
360+ backup . call ( "ACL" , "SETUSER" , "AnotherUser" , ">boom" , "off" )
361+ client = new_client ( username : "AnotherUser" , password : "boom" )
360362 error = assert_raises RedisClient ::AuthenticationError do
361363 client . call_once ( "PING" )
362364 end
363365 assert_match ( /WRONGPASS invalid username-password pair/ , error . message )
364366
365367 # Correct password, user enabled
366- backup . call ( "ACL" , "SETUSER" , "AzureDiamond " , "on" )
368+ backup . call ( "ACL" , "SETUSER" , "AnotherUser " , "on" )
367369 assert_equal "PONG" , client . call_once ( "PING" )
368370 assert_match ( /user=AzureDiamond/ , client . call ( "CLIENT" , "INFO" ) )
369371
370372 # Wrong username
371- client = new_client ( username : "GreenOpal" , password : "trolilol " )
373+ client = new_client ( username : "GreenOpal" , password : "boom " )
372374 error = assert_raises RedisClient ::AuthenticationError do
373375 client . call ( "PING" )
374376 end
0 commit comments