Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: system test improvements #16

Merged
merged 3 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions tests/monit.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ Resource ./resources/common.robot
Library Cumulocity
Library DeviceLibrary bootstrap_script=bootstrap.sh

Suite Setup Suite Setup

*** Variables ***

&{DOCKER_CONFIG} image=%{IMAGE= }
Test Setup Test Setup

*** Test Cases ***

Expand All @@ -19,6 +15,7 @@ Reconnect on cloud connection loss (by stopping mosquitto)

# Simulate an error by stopping mosquitto
Execute Command sudo systemctl stop mosquitto
Execute Command sudo systemctl stop tedge-mapper-c8y
Sleep 2s reason=Wait for mosquitto service to be shutdown
Execute Command tedge connect c8y --test timeout=120
Execute Command systemctl is-active mosquitto
Expand All @@ -27,8 +24,8 @@ Reconnect on cloud connection loss (by stopping mosquitto)

*** Keywords ***

Suite Setup
${DEVICE_SN}= DeviceLibrary.Setup
Test Setup
${DEVICE_SN}= Setup
Set Suite Variable $DEVICE_SN

Decrease monit intervals
Expand Down
4 changes: 4 additions & 0 deletions tests/resources/common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ Library Cumulocity

# Cumulocity settings
&{C8Y_CONFIG} host=%{C8Y_BASEURL= } username=%{C8Y_USER= } password=%{C8Y_PASSWORD= } tenant=%{C8Y_TENANT= }

# Docker adapter settings (to control which image is used in the system tests).
# The user just needs to set the IMAGE env variable
&{DOCKER_CONFIG} image=%{IMAGE= }