Skip to content

tests: the auto-updater is tested end to end - #1221

Open
MichaelBelousov wants to merge 1 commit into
fizzyedit:mainfrom
MichaelBelousov:tests/autoupdate
Open

MichaelBelousov wants to merge 1 commit into
fizzyedit:mainfrom
MichaelBelousov:tests/autoupdate

Conversation

@MichaelBelousov

Copy link
Copy Markdown
Contributor

zig build test-autoupdate packages the app as 1.0.0 and 1.0.1 (zig build package of the same build file, each into a prefix of its own), then tests/autoupdate.zig serves a feed over HTTP on an ephemeral port and runs the 1.0.0 AppImage (APPIMAGE_EXTRACT_AND_RUN=1, its own profile, FIZZY_QUIET) three times: against a feed nobody answers (the check fails, the AppImage is left alone), an empty feed (nothing to install), and 1.0.1's, where it installs the update and Velopack replaces the AppImage, which must then log that it is 1.0.1. Linux only, not part of zig build test. An app built on fizzy gets the same step with fizzy.addAutoUpdateTestStep.

Nothing installed an update without a person's click, so the test asks for it through the control server with a new internal command, fizzy.update.install, which does what the update toast's Relaunch to update does (kickInstall, then the usual restart into the download) and fails when the launch check found nothing. The launch check now logs what it found ("fizzy autoupdate: update available: X", "remote feed empty", "no update available", "check failed: why"), and the apply at exit says it is applying; the test reads those lines. packageall's forwarding of the command line moves into package.commandLineOptions, which the new step shares.

`zig build test-autoupdate` packages the app as 1.0.0 and 1.0.1 (`zig build package` of the same
build file, each into a prefix of its own), then `tests/autoupdate.zig` serves a feed over HTTP on
an ephemeral port and runs the 1.0.0 AppImage (`APPIMAGE_EXTRACT_AND_RUN=1`, its own profile,
`FIZZY_QUIET`) three times: against a feed nobody answers (the check fails, the AppImage is left
alone), an empty feed (nothing to install), and 1.0.1's, where it installs the update and Velopack
replaces the AppImage, which must then log that it is 1.0.1. Linux only, not part of `zig build
test`. An app built on fizzy gets the same step with `fizzy.addAutoUpdateTestStep`.

Nothing installed an update without a person's click, so the test asks for it through the control
server with a new internal command, `fizzy.update.install`, which does what the update toast's
Relaunch to update does (`kickInstall`, then the usual restart into the download) and fails when
the launch check found nothing. The launch check now logs what it found ("fizzy autoupdate: update
available: X", "remote feed empty", "no update available", "check failed: why"), and the apply at
exit says it is applying; the test reads those lines. `packageall`'s forwarding of the command
line moves into `package.commandLineOptions`, which the new step shares.
@MichaelBelousov

Copy link
Copy Markdown
Contributor Author

I have set a local agent to fix CI failures, will see how it goes

This branch was successfully deployed

1 active deployment
bridge — e188b290 Deployed Nov 26, 2026 by MichaelBelousov via bridge #4928
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.

1 participant