summaryrefslogtreecommitdiffstats
path: root/mqtt-tester/src
AgeCommit message (Collapse)Author
2023-01-23Merge #153 #167bors[bot]
153: Reimplement execution of behaviour tests with helper fn r=TheNeikos a=matthiasbeyer Extracted from #133 167: Fix wait for connect impl r=TheNeikos a=matthiasbeyer Extracted from #133 Co-authored-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-23Fix: Send CONNACK in WaitForConnectMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-23Fix: The string length is a byte 4, not 5Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-23Fix: Read from connection until no more bytes are returnedMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-23Merge #152bors[bot]
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>
2023-01-20Merge #157bors[bot]
157: Instrument wait_and_check() implementation r=TheNeikos a=matthiasbeyer Extracted from #133 Co-authored-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-20Add logging in WaitForConnect behaviour testMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-20Instrument wait_and_check() implementationMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Reimplement execution of behaviour tests with helper fnMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Use check result as return value if binary succeededMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Merge #155bors[bot]
155: Allow building of ReportResult from bool r=TheNeikos a=matthiasbeyer Extracted from #133 Co-authored-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Fix: Remove readMatthias Beyer
This read was a bug. We only need to read two bytes and then decide what to do, not three. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Let BehaviourTest::execute() return Result<ReportResult>Matthias Beyer
... so we can return a report result if the wait_and_check() call in use failed. If there is only send() used, we always succeed, except when the send() itself failed (because of broken pipe for example) Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Let Command::wait_and_check() return Result<ReportResult>Matthias Beyer
We need to be able to tell the caller whether the check has failed or not. A ReportResult is the perfect way of doing this. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Impl From<bool> for ReportResultMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Add error contextsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Add tracing instrumentationMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Reimpl check as PacketInvariant: ConnectPacketProtocolNameMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Add log output during behaviour test executionMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Fix: Execute behaviour test and client future concurrentlyMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Fix: Execute behaviour tests properlyMatthias Beyer
Somehow we messed up the execution of the behaviour tests when implementing it. This patch changes the execution to match the previous implementation of the `check_*` async functions. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Fix: Do not tell client to quitMatthias Beyer
The WaitForConnect BehaviourTest should not tell the client to quit, because that's not necessary for the test to succeed. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Add four dashes to seperate commandsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-19Merge #145 #146bors[bot]
145: Fix error message: We test the client here r=TheNeikos a=matthiasbeyer This is extracted from #133 for making that PR smaller. 146: Tester logging r=TheNeikos a=matthiasbeyer This is extracted from #133 for making that PR smaller. Adds logging output via tracing in the tester implementation. Co-authored-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Add log output when building CLI callMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Add logging via tracingMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Remove unused fnMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Remove unused fnMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Reimpl test as BehaviourTest: FirstPacketFromClientIsConnectMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Reimpl test as BehaviourTest: PublishQos2IsAckedMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Reimpl test as BehaviourTest: PublishQosZeroWithIdentFailsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Reimpl test as BehaviourTest: ConnackFlagsAreSetAsReservedMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Reimpl test as BehaviourTest: Utf8WithNullcharIsRejectedMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Reimpl test as BehaviourTest: InvalidFirstPacketIsRejectedMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Use test structs publicly in behaviour module to ease importsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Reimpl test as BehaviourTest: ReceivingServerPacketMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Add missing meta information to behaviour testsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Use BehaviourTest interfaces to construct Report objectsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Let BehaviourTest provide more information about testsMatthias Beyer
This patch adds functions the BehaviourTest trait for providing more information about the individual test cases. These are then used to construct Report objects from the test runs. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Reimplement check_invalid_utf8_is_rejected as BehaviourTestMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-18Fix error message: We test the client hereMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-12Move invariants to dedicated submoduleMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-12Move behaviours to dedicated moduleMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-12Rename: Flow -> BehaviourTestMatthias Beyer
The name "Flow" was not that nice, so we rename this to "BehaviourTest", because that's what it is: a test for the behaviour of a client. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-11Replace CheckBytesFn with CheckBytes traitMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-11Fix impl for testing invariants, returning Option<_>Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-11Fix: NoUsernameMeansNoPassword impl PacketInvariant returns Option<_>Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-11Let PacketInvariant::test_invariant return Option<_>Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-11Fix WaitForConnectFlow for new Flow interfaceMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-11Let Flow interface take input and output of Command seperatelyMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>