mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed unittest
This commit is contained in:
parent
cae19d0b5a
commit
202c18243b
@ -92,11 +92,11 @@ public class AuthenticatorTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testAuthentication() throws UnsupportedEncodingException, NoSuchAlgorithmException {
|
public void testAuthentication() throws UnsupportedEncodingException, NoSuchAlgorithmException {
|
||||||
Map<String, Object[]> dummyMap = new HashMap<String, Object[]>();
|
Map<String, Object[]> dummyMap = new HashMap<String, Object[]>();
|
||||||
assertEquals("32 byte salt authenticated", true, authenticator.authenticate("admin", "password", 0L, dummyMap));
|
assertEquals("32 byte salt authenticated", true, authenticator.authenticate("admin", "password", 0L, dummyMap).first());
|
||||||
assertEquals("20 byte salt authenticated", true, authenticator.authenticate("admin20Byte", "password", 0L, dummyMap));
|
assertEquals("20 byte salt authenticated", true, authenticator.authenticate("admin20Byte", "password", 0L, dummyMap).first());
|
||||||
assertEquals("fake user not authenticated", false, authenticator.authenticate("fake", "fake", 0L, dummyMap));
|
assertEquals("fake user not authenticated", false, authenticator.authenticate("fake", "fake", 0L, dummyMap).first());
|
||||||
assertEquals("bad password not authenticated", false, authenticator.authenticate("admin", "fake", 0L, dummyMap));
|
assertEquals("bad password not authenticated", false, authenticator.authenticate("admin", "fake", 0L, dummyMap).first());
|
||||||
assertEquals("20 byte user bad password not authenticated", false, authenticator.authenticate("admin20Byte", "fake", 0L, dummyMap));
|
assertEquals("20 byte user bad password not authenticated", false, authenticator.authenticate("admin20Byte", "fake", 0L, dummyMap).first());
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Test
|
// @Test
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user