diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-01-23 08:13:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-23 08:13:54 +0000 |
commit | 9227f252c9c49001e6089af47b040c7c30cb7e69 (patch) | |
tree | 2cffd70dab6a93365ded6603fcfb48c85b8db470 /mqtt-tester | |
parent | 977257a65a35f170d615e90e05328891f532d558 (diff) | |
parent | c3c6b4ff34f88406e692837350329f2289c78527 (diff) |
Merge #152
152: Use check result as return value if binary succeeded r=TheNeikos a=matthiasbeyer
Extracted from #133
Co-authored-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'mqtt-tester')
-rw-r--r-- | mqtt-tester/src/client_report.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mqtt-tester/src/client_report.rs b/mqtt-tester/src/client_report.rs index 36bdee3..4ccec6e 100644 --- a/mqtt-tester/src/client_report.rs +++ b/mqtt-tester/src/client_report.rs @@ -218,7 +218,7 @@ async fn check_connect_packet_reserved_flag_zero( .map(crate::command::Command::new)? .spawn()?; - output + let check_result = output .wait_and_check( &(|bytes: &[u8]| -> bool { bytes[0] == 0b0001_0000 // CONNECT packet with flags set to 0000 @@ -231,7 +231,7 @@ async fn check_connect_packet_reserved_flag_zero( let (result, output) = wait_for_output! { output, timeout_ms: 100, - out_success => { ReportResult::Success }, + out_success => { check_result }, out_failure => { ReportResult::Inconclusive } }; @@ -273,7 +273,7 @@ async fn check_connect_flag_username_set_username_present( .map(crate::command::Command::new)? .spawn()?; - output + let check_result = output .wait_and_check( &(|bytes: &[u8]| -> bool { let connect_flags = if let Some(flags) = find_connect_flags(bytes) { @@ -308,7 +308,7 @@ async fn check_connect_flag_username_set_username_present( let (result, output) = wait_for_output! { output, timeout_ms: 100, - out_success => { ReportResult::Success }, + out_success => { check_result }, out_failure => { ReportResult::Inconclusive } }; @@ -330,7 +330,7 @@ async fn check_connect_flag_password_set_password_present( .map(crate::command::Command::new)? .spawn()?; - output + let check_result = output .wait_and_check( &(|bytes: &[u8]| -> bool { let connect_flags = if let Some(flags) = find_connect_flags(bytes) { @@ -365,7 +365,7 @@ async fn check_connect_flag_password_set_password_present( let (result, output) = wait_for_output! { output, timeout_ms: 100, - out_success => { ReportResult::Success }, + out_success => { check_result }, out_failure => { ReportResult::Inconclusive } }; @@ -387,7 +387,7 @@ async fn check_connect_flag_username_zero_means_password_zero( .map(crate::command::Command::new)? .spawn()?; - output + let check_result = output .wait_and_check( &(|bytes: &[u8]| -> bool { let connect_flags = if let Some(flags) = find_connect_flags(bytes) { @@ -413,7 +413,7 @@ async fn check_connect_flag_username_zero_means_password_zero( let (result, output) = wait_for_output! { output, timeout_ms: 100, - out_success => { ReportResult::Success }, + out_success => { check_result }, out_failure => { ReportResult::Inconclusive } }; |