summaryrefslogtreecommitdiffstats
path: root/mqtt-tester/src/behaviour_test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mqtt-tester/src/behaviour_test.rs')
-rw-r--r--mqtt-tester/src/behaviour_test.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/mqtt-tester/src/behaviour_test.rs b/mqtt-tester/src/behaviour_test.rs
index a601c5c..fd334df 100644
--- a/mqtt-tester/src/behaviour_test.rs
+++ b/mqtt-tester/src/behaviour_test.rs
@@ -7,6 +7,7 @@
use crate::{
command::{Input, Output},
executable::ClientExecutableCommand,
+ report::ReportResult,
};
#[async_trait::async_trait]
@@ -14,4 +15,16 @@ pub trait BehaviourTest {
fn commands(&self) -> Vec<Box<dyn ClientExecutableCommand>>;
async fn execute(&self, mut input: Input, mut output: Output) -> Result<(), miette::Error>;
+
+ fn report_name(&self) -> &str;
+ fn report_desc(&self) -> &str;
+ fn report_normative(&self) -> &str;
+
+ fn translate_client_exit_code(&self, success: bool) -> ReportResult {
+ if success {
+ ReportResult::Success
+ } else {
+ ReportResult::Failure
+ }
+ }
}