tests: add a harness that starts throwaway Forgejo and Gitea servers behind Traefik #677
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#674 epic: run forge tests against throwaway Forgejo and Gitea servers behind a real proxy
sixfold-space/madtea
#678 ci: run the forge tests on the harness in the gate and in CI, and remove the docker-exec smoke job
sixfold-space/madtea
#679 tests: move the internal/gitea tests from fake forges to the harness
sixfold-space/madtea
#680 tests: move the internal/mcp tests from fake forges to the harness
sixfold-space/madtea
#681 tests: move the internal/service tests from fake forges to the harness
sixfold-space/madtea
#682 tests: move the remaining tests from fake forges to the harness
sixfold-space/madtea
#692 gate: run the forge tests only inside an Incus VM
sixfold-space/madtea
Reference
sixfold-space/madtea#677
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
A test harness in Go that gives a test a real forge, as ADR 0017 decides. For each of Forgejo and Gitea, the harness:
Traefik also comes from a pinned binary with a checked SHA-256. The harness needs no docker and no secret.
The pins live in one file. A
madtea-devcommand bumps them: it finds the latest release of Forgejo, Gitea, and Traefik, downloads each one, and writes the new version and checksum. Nobody edits a pin by hand.Acceptance
madtea-devcommand writes the pin file. A second run with no new release changes nothing.Part of #674.
Done. The harness is built in internal/testforge and passes green in the forge-test VM:
go test -tags forge ./internal/testforge/...is ok (PR #760). Each acceptance item has a passing test: version through the proxy (TestForgeVersionThroughProxy), rate-limit refusal (TestForgeRateLimitRefusal), stopped-server error (TestForgeStoppedServerError), bad-checksum aborts naming the file (TestResolveBinaryChecksumMismatch, TestVerifySHA256MismatchNamesFile), and the pin bump writes and is idempotent (TestBumpPinsWritesPinFile, TestBumpPinsIdempotent). Traefik and both forges come from pinned, checksum-verified binaries; no docker, no secret.