Skip to content

End-to-end tests using aktualizr-lite - #231

Open
detsch wants to merge 4 commits into
foundriesio:mainfrom
detsch:aklite-e2e
Open

End-to-end tests using aktualizr-lite#231
detsch wants to merge 4 commits into
foundriesio:mainfrom
detsch:aklite-e2e

Conversation

@detsch

@detsch detsch commented Aug 20, 2026

Copy link
Copy Markdown
Member

Also implement ostree/download-urls, required by fiopull

@detsch
detsch force-pushed the aklite-e2e branch 2 times, most recently from 6007e20 to 6d7bca2 Compare August 24, 2026 12:39

@doanac doanac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@detsch
detsch force-pushed the aklite-e2e branch 5 times, most recently from 717747d to f0fad00 Compare August 28, 2026 20:01
detsch and others added 4 commits August 28, 2026 17:12
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>
@detsch
detsch marked this pull request as ready for review August 28, 2026 20:30
@detsch

detsch commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

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.

Comments adjusted.

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.

Previous middle commit is now 2 commits: one making the fixture generic, and other adding the test and required files.

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