End-to-end tests using aktualizr-lite - #231
Conversation
6007e20 to
6d7bca2
Compare
doanac
left a comment
There was a problem hiding this comment.
I like the general idea. A couple of notes: The comments can become excessive in places thanks to Claude. For example, I'm not sure the fiopull test case needs to explain how fiopull works/differs from the normal path; its sufficient to have two different tests.
The middle commit is a lot to follow. It "contrib" code, so I'm fine with it if its a pain to splite up, but its hard to really follow that commit. I mostly skipped to the end and looked at the test_e2e_aklite_update_flow.py file.
717747d to
f0fad00
Compare
The endpoint returned 204, so aktualizr-lite always fell back to the libostree pull over the mTLS gateway and never used fiopull. Return the gateway's ostree URL plus a short-lived Bearer token instead, and let the /ostree/* route authenticate via either an mTLS client certificate (libostree) or that token (fiopull). Token lookup is shared with the existing registry auth via a small lookupTokenDevice helper. Signed-off-by: Andre Detsch <andre.detsch@foundries.io> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull the container launch/teardown, dockerd wait, credential install, and device-registration poll out of the fioup fixtures into standalone helpers so a second device client can reuse them. No behavior change. Signed-off-by: Andre Detsch <andre.detsch@foundries.io> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drive a real aktualizr-lite client through the full online update flow against a locally-run fioserver (register, upload, check/pull/install, reboot, run) and verify the installed version, running app, and server events. Two things worth noting: the client image needs glib-networking because libostree 2025.1 pulls over libsoup3/GnuTLS, and add_device.sh is fixed to sign device certs with clientAuth/digitalSignature usage (GnuTLS rejects them otherwise). The aklite build is gated behind aklite-build/aklite-run so the default make targets used by CI stay unchanged. Signed-off-by: Andre Detsch <andre.detsch@foundries.io> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Exercise the fiopull pull path by setting ostree_pull_tool = "fiopull"; fiopull uses the Bearer token from /ostree/download-urls, so it pulls from update-server directly with no mTLS. Uses a second, higher-versioned update so it can run after the libostree test on the same device. Signed-off-by: Andre Detsch <andre.detsch@foundries.io> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comments adjusted.
Previous middle commit is now 2 commits: one making the fixture generic, and other adding the test and required files. |
Also implement ostree/download-urls, required by fiopull