pull/146/head
Chip Senkbeil 2 years ago
parent 504cecd986
commit f47831b3aa
No known key found for this signature in database
GPG Key ID: 35EF1F8EC72A4131

@ -110,7 +110,7 @@ mod tests {
use super::*;
use crate::{
auth::msg::{AuthenticationResponse, ChallengeResponse},
utils, FramedTransport,
FramedTransport,
};
use test_log::test;
@ -149,12 +149,9 @@ mod tests {
let (mut t1, mut t2) = FramedTransport::test_pair(100);
// Queue up a response to the initialization request
t2.write_frame(
utils::serialize_to_vec(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec!["id".to_string()],
}))
.unwrap(),
)
t2.write_frame_for(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec!["id".to_string()],
}))
.await
.unwrap();
@ -170,12 +167,9 @@ mod tests {
let (mut t1, mut t2) = FramedTransport::test_pair(100);
// Queue up a response to the initialization request
t2.write_frame(
utils::serialize_to_vec(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec!["id".to_string(), "secret key".to_string()],
}))
.unwrap(),
)
t2.write_frame_for(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec!["id".to_string(), "secret key".to_string()],
}))
.await
.unwrap();
@ -191,15 +185,12 @@ mod tests {
let (mut t1, mut t2) = FramedTransport::test_pair(100);
// Queue up a response to the initialization request
t2.write_frame(
utils::serialize_to_vec(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec![
"id2".to_string(),
HeapSecretKey::from(b"secret key".to_vec()).to_string(),
],
}))
.unwrap(),
)
t2.write_frame_for(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec![
"id2".to_string(),
HeapSecretKey::from(b"secret key".to_vec()).to_string(),
],
}))
.await
.unwrap();
@ -215,15 +206,12 @@ mod tests {
let (mut t1, mut t2) = FramedTransport::test_pair(100);
// Queue up a response to the initialization request
t2.write_frame(
utils::serialize_to_vec(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec![
"id".to_string(),
HeapSecretKey::from(b"wrong secret key".to_vec()).to_string(),
],
}))
.unwrap(),
)
t2.write_frame_for(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec![
"id".to_string(),
HeapSecretKey::from(b"wrong secret key".to_vec()).to_string(),
],
}))
.await
.unwrap();
@ -239,15 +227,12 @@ mod tests {
let (mut t1, mut t2) = FramedTransport::test_pair(100);
// Queue up a response to the initialization request
t2.write_frame(
utils::serialize_to_vec(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec![
"id".to_string(),
HeapSecretKey::from(b"secret key".to_vec()).to_string(),
],
}))
.unwrap(),
)
t2.write_frame_for(&AuthenticationResponse::Challenge(ChallengeResponse {
answers: vec![
"id".to_string(),
HeapSecretKey::from(b"secret key".to_vec()).to_string(),
],
}))
.await
.unwrap();

Loading…
Cancel
Save