diff options
Diffstat (limited to 'mqtt-tester/src/behaviour/wait_for_connect.rs')
-rw-r--r-- | mqtt-tester/src/behaviour/wait_for_connect.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mqtt-tester/src/behaviour/wait_for_connect.rs b/mqtt-tester/src/behaviour/wait_for_connect.rs index d61fe85..561acca 100644 --- a/mqtt-tester/src/behaviour/wait_for_connect.rs +++ b/mqtt-tester/src/behaviour/wait_for_connect.rs @@ -8,6 +8,7 @@ use crate::{ behaviour_test::BehaviourTest, command::{Input, Output}, executable::ClientExecutableCommand, + report::ReportResult, }; pub struct WaitForConnect; @@ -40,6 +41,26 @@ impl BehaviourTest for WaitForConnect { ) .await } + + fn report_name(&self) -> &str { + "Wait for client to connect" + } + + fn report_desc(&self) -> &str { + "A client should send a CONNECT packet to connect to the server" + } + + fn report_normative(&self) -> &str { + "none" + } + + fn translate_client_exit_code(&self, success: bool) -> ReportResult { + if success { + ReportResult::Success + } else { + ReportResult::Failure + } + } } fn find_connect_flags(bytes: &[u8]) -> Option<u8> { |