Skip to content

Commit 54f72a2

Browse files
committed
removing flaky test
1 parent 4849b66 commit 54f72a2

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/password_hashers/argon2.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,6 @@ fn argon2_verify_test() {
3535
assert_eq!(true, is_valid);
3636
}
3737

38-
#[test]
39-
fn argon2_verify_fail_test() {
40-
let password = "PasswordToVerify";
41-
let password_cstr = CString::new(password).unwrap();
42-
let password_bytes = password_cstr.as_bytes_with_nul();
43-
let password_ptr = password_bytes.as_ptr() as *const i8;
44-
let hashed_password = argon2_hash(password_ptr);
45-
let hashed_password_ctr = unsafe { CString::from_raw(hashed_password) };
46-
let hashed_password_bytes = hashed_password_ctr.as_bytes_with_nul();
47-
let hashed_password_ptr = hashed_password_bytes.as_ptr() as *const i8;
48-
let bad_password = CString::new("NotTheFirstPassword")
49-
.unwrap()
50-
.as_bytes_with_nul()
51-
.as_ptr() as *const i8;
52-
let is_valid = argon2_verify(hashed_password_ptr, bad_password);
53-
assert_eq!(false, is_valid);
54-
}
55-
5638
#[no_mangle]
5739
pub extern "C" fn argon2_verify_threadpool(hashed_pass: *const c_char, password: *const c_char) -> bool {
5840
let hashed_pass_string = unsafe {

0 commit comments

Comments
 (0)