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

feat: Add functional test for update agent [ORBP-573] #310

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

alekseifedotov
Copy link
Contributor

@alekseifedotov alekseifedotov commented Dec 6, 2024

In this PR I'm adding integration test for update agent.

How it works

The script spawns a podman container with update-agent inside. That docker container partially reproduces orb environment. It mocks:

  • efivars
  • /usr/persistent/
  • /dev/mmcblk0 (sdcard).
  • /etc/orb_update_agent.conf
  • claim.json

In claim.json it contains links on local files to get the update.
After update-agent is done, the script compares the resulting partitions with the expected ones.

Future steps

  • generate OTA files on startup
  • integrate the test in the CI
  • add localstack to mock S3 buckets
  • add dbus in the container to mock dbus communication
  • add mcu emulation
  • add capsule update mock

I'll make it a draft for now.


Requirements:

@alekseifedotov alekseifedotov marked this pull request as draft December 6, 2024 20:33
@alekseifedotov alekseifedotov changed the title Add integration test for update agent Add integration test for update agent [ORBP-573] Dec 9, 2024
@alekseifedotov alekseifedotov force-pushed the aleksei/add-integration-test-for-update-agent branch from 44e5edf to f3b7a49 Compare December 13, 2024 19:19
@alekseifedotov alekseifedotov force-pushed the aleksei/add-integration-test-for-update-agent branch from f3b7a49 to c4a2166 Compare January 20, 2025 13:06
@alekseifedotov alekseifedotov changed the title Add integration test for update agent [ORBP-573] Add functional test for update agent [ORBP-573] Jan 28, 2025
@alekseifedotov alekseifedotov force-pushed the aleksei/add-integration-test-for-update-agent branch 3 times, most recently from e4ee7eb to 18df958 Compare February 3, 2025 15:36
@alekseifedotov alekseifedotov changed the title Add functional test for update agent [ORBP-573] feat: Add functional test for update agent [ORBP-573] Feb 3, 2025
@alekseifedotov alekseifedotov force-pushed the aleksei/add-integration-test-for-update-agent branch 6 times, most recently from a2f64dc to 6ab7165 Compare February 4, 2025 13:00
@alekseifedotov alekseifedotov marked this pull request as ready for review February 4, 2025 13:00
@alekseifedotov alekseifedotov force-pushed the aleksei/add-integration-test-for-update-agent branch 4 times, most recently from 348b580 to 392a643 Compare February 4, 2025 14:25
@alekseifedotov alekseifedotov force-pushed the aleksei/add-integration-test-for-update-agent branch from 392a643 to 756a593 Compare February 4, 2025 15:12
Copy link
Contributor

@vmenge vmenge left a comment

Choose a reason for hiding this comment

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

this is awesome and I think a great start for us in feeling safe with update-agent changes 🥳

what I'd ask here is to as a next step (on a separate PR) move this over to something that can be used with both cargo watch and cargo test for a quick feedback loop when iterating locally 🙏

@alekseifedotov
Copy link
Contributor Author

what I'd ask here is to as a next step (on a separate PR) move this over to something that can be used with both cargo watch and cargo test for a quick feedback loop when iterating locally 🙏

The test itself takes a couple of minutes, so I don't think it is suitable to run in cargo watch

@alekseifedotov alekseifedotov merged commit 13c9133 into main Feb 4, 2025
16 checks passed
@alekseifedotov alekseifedotov deleted the aleksei/add-integration-test-for-update-agent branch February 4, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants