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: add missing firmware init information test #108

Merged
merged 2 commits into from
Oct 5, 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
9 changes: 9 additions & 0 deletions images/child-device-container/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ fi
(cd /tmp && sudo /usr/bin/enroll.sh --no-inherit-env --provisioner-password-file "$PROVISION_PASSWORD_FILE")
rm -f "$PROVISION_PASSWORD_FILE"

# FIXME: Remove once tedge-agent register the agent automatically
# or there is a dedicate "tedge register device" command
TOPIC_ROOT=$(tedge config get mqtt.topic_root)
TOPIC_ID=$(tedge config get mqtt.device_topic_id)
DEVICE_TYPE=$(tedge config get device.type)
while ! tedge mqtt pub --retain --qos 1 "$TOPIC_ROOT/$TOPIC_ID" "$(printf '{"@type":"child-device","type":"%s","name":"%s"}' "$DEVICE_TYPE" "$(hostname)")"; do
sleep 5
done

# configure device scripts (run once)
if [ ! -f /etc/tedge/.configure-device-ran ]; then
/usr/share/configure-device/runner.sh
Expand Down
3 changes: 3 additions & 0 deletions tests/debian-systemd/children-container/operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Suite Setup Set Child Device1

*** Test Cases ***

Firmware information should be shown on startup
Cumulocity.Managed Object Should Have Fragment Values c8y_Firmware.name\=iot-linux c8y_Firmware.version\=1.0.0

Install Firmware
Cumulocity.Should Have Services name=tedge-agent status=up timeout=120
${date_from}= Get Test Start Time
Expand Down