Skip to content

test: add mytool demo and end-to-end update suite - #10

Merged
bfirestone merged 8 commits into
mainfrom
feat/e2e-test-app
Sep 9, 2026
Merged

bfirestone merged 8 commits into
mainfrom
feat/e2e-test-app

Conversation

@bfirestone

@bfirestone bfirestone commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #11. Adds examples/mytool, the runnable README example, and a private end-to-end suite under internal/e2e.

TestMain builds the demo twice with different -ldflags versions, serves a GitHub-shaped release with a tarball and checksums.txt from httptest, and runs self update as a subprocess. Eight scenarios prove what the unit suite can't: the running binary is replaced in place, the hooks see v1.0.0 before the swap and v1.1.0 after it, refusals happen before any download, and on macOS the result passes codesign --verify. go test -short ./... skips the suite.

The suite caught a real bug on the way: replaceFile never chmod'ed after create, so umask 077 produced an owner-only binary. That fix landed on #11.

Verify with go test -count=1 ./... on Linux and macOS.

@bfirestone

bfirestone commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

Base automatically changed from feat/native-installer to main September 9, 2026 00:31
@bfirestone
bfirestone merged commit 8c07f53 into main Sep 9, 2026
3 checks passed
@bfirestone
bfirestone deleted the feat/e2e-test-app branch September 9, 2026 00:32
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