Skip to content

Commit

Permalink
Merge pull request #108 from thin-edge/test-child-container-firmware-…
Browse files Browse the repository at this point in the history
…init-test

test: add missing firmware init information test
  • Loading branch information
reubenmiller authored Oct 5, 2024
2 parents f05a0b4 + 4ae8e9e commit 8e82a76
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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

8 comments on commit 8e82a76

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
11 0 2 11 100 50.381s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
14 0 0 14 100 56.562s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
7 0 0 7 100 48.314s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
26 0 2 26 100 3m0.658s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
14 0 0 14 100 1m4.31s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
11 0 2 11 100 50.444s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
7 0 0 7 100 45.745999999s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
26 0 2 26 100 2m58.922s

Please sign in to comment.