Repository navigation
ci probe A (head HAS test.yml, base lacks it) — will close - #54
Closed
madejackson wants to merge 3 commits into
Closed
madejackson wants to merge 3 commits into
madejackson wants to merge 3 commits into
Conversation
…teAddr `go test ./src/...` on this tree failed one test: TestGetCertificateProvidedAndHTTPOnly expected 404 for www.own.org, other.net and 192.168.1.10. That is the fork's restored HTTP->HTTPS redirect (dd395ed, upstream PR azukaar#576) meeting upstream's zones_test.go (63e5a24), which encodes the opposite design position for the same function. Decided deliberately, not papered over: the fork keeps the redirect, and the test now asserts it. azukaar#576 stays open upstream -- closing it "in favour of" upstream's 404 would record that upstream had the redirect and removed it in favour of this, which is false. 748302d dropped the handler and nothing replaced it. The assertion is commented with azukaar#576 on each line and the divergence is ledgered in ASERACORP.md. The 192.168.1.10 case was not a behaviour difference at all: the fixture never set RemoteAddr, so httptest's default 1.2.3.4 was used. That is not loopback, not private and not CGNAT, so IsLocalIP returned false and the local-IP passthrough branch was unreachable -- the test was asserting 404 for code it never exercised. RemoteAddr is now set explicitly and both directions are covered (remote -> 301, private/CGNAT -> served directly), so the fixture tests the passthrough instead of accidentally bypassing it. Lowering the bar to 404-on-localhost would have been the wrong fix; the fixture was the broken part. Verified by mutation, so the assertion cannot pass by accident: swapping the fork's http.Redirect(...StatusMovedPermanently) for upstream's http.NotFound, passthrough untouched, fails exactly the three redirect cases; reverting the handler wholesale fails all five. Also runs the suite in CI (build.yml). It only fires on push to master/unstable, so this catches drift after merge, not at PR time -- upstream has no PR-time workflow and adding one is the maintainer's call. The Test step copies the gitignored src/launcher/update.go first, same as build.sh: go test ./src/... cannot compile src/launcher without it.
build.yml fires only on push to master/unstable, and publishes a release. A PR into this repo has no tests run against it at all, so test drift (the zones_test.go divergence in this branch, for one) surfaces only after merge. Separate file on purpose: build.yml publishes to GHCR and creates a GitHub Release with allowUpdates, and a pull_request trigger must not be able to reach those. This workflow is contents:read, nothing else. The step copies the gitignored src/launcher/update.go first, exactly as build.sh does -- go test ./src/... cannot compile src/launcher without it (launcher.go:160: undefined: GetLatestVersion). pull_request runs the workflow file as it exists in the PR's base branch, so this file cannot validate the PR that adds it: its own runs start once it is on master/unstable. Verified locally on a clean checkout (no GeoLite2 mmdb, no nebula/restic binaries, no client build output): the step's two commands give go test -count=1 ./src/... all packages ok.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Throwaway CI probe — result: the
testjob ran and passed (success, ~5 min onubuntu-latest). Head branch had.github/workflows/test.yml, base (unstable) did not. Provespull_requestresolves workflows from the merge ref, so a PR that adds a workflow is covered by it on its own first push. Superseded by #57.