Skip to content

Commit

Permalink
fixup! fixup! fixup! implement changes addressed in comments
Browse files Browse the repository at this point in the history
Signed-off-by: gligorisaev <[email protected]>
  • Loading branch information
gligorisaev committed Jun 19, 2024
1 parent 8459823 commit bbb9e72
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions tests/RobotFramework/tests/mqtt/disconnect_from_broker.robot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Library ThinEdgeIO
Library OperatingSystem
Library String

Suite Setup Custom Setup
Suite Setup Setup
Suite Teardown Get Logs

Test Tags theme:mqtt
Expand All @@ -25,32 +25,14 @@ Validate no Error message in journalctl
${log} Execute Command journalctl -u mosquitto -n 30
Should Not Contain ${log} Error

Publish Connection Closed On Interruption
Publish Connection Closed after publish
[Documentation] Tests that a publish connection to MQTT broker closes upon interruption.
Execute Command tedge mqtt pub ${TOPIC} ${MESSAGE} ignore_exit_code=True
Execute Command tedge mqtt pub test/topic Hello
${MQTT_PUB} Execute Command journalctl -u mosquitto -n 30
Should Contain ${MQTT_PUB} Received DISCONNECT from tedge-pub
Log MQTT publish connection was closed upon interruption.

Subscribe Connection Closed On Interruption
[Documentation] Tests that a subscribe connection to MQTT broker closes upon interruption.
Execute Command timeout 2 tedge mqtt sub ${TOPIC} ignore_exit_code=True
Execute Command timeout 2 tedge mqtt sub test/topic ignore_exit_code=True
${MQTT_SUB} Execute Command journalctl -u mosquitto -n 30
Should Contain ${MQTT_SUB} Received DISCONNECT from tedge-sub
Log MQTT subscribe connection was closed upon interruption.


*** Keywords ***

Custom Setup
Setup
tedge configure MQTT server authentication
tedge configure MQTT client authentication

tedge configure MQTT server authentication
Execute Command tedge config set mqtt.client.port 8883
Execute Command tedge config set mqtt.client.auth.ca_file /etc/mosquitto/ca_certificates/ca.crt

tedge configure MQTT client authentication
Execute Command tedge config set mqtt.client.auth.cert_file client.crt
Execute Command tedge config set mqtt.client.auth.key_file client.key

0 comments on commit bbb9e72

Please sign in to comment.