acceptance: drop darwin-only gate from bundle open + force_pull_commands#5217
Merged
simonfaltum merged 1 commit intomainfrom May 8, 2026
Merged
Conversation
Both tests previously relied on `export PATH=.:$PATH` plus a local `open` stub to suppress the real browser, which only worked on macOS (Go's exec.LookPath rejects results from "."). They were gated to darwin via GOOS.windows=false, GOOS.linux=false. Use BROWSER=echo_browser.py instead. libs/browser already honors $BROWSER and routes through libs/exec, so the stub runs portably on darwin/linux/windows. The new helper just prints the URL and exits 0, unlike the existing browser.py which performs an HTTP fetch (we don't want that in force_pull_commands because it would pollute out.requests.txt). Co-authored-by: Isaac
pietern
approved these changes
May 8, 2026
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.
Why
Follow-up to #5212. Both
acceptance/bundle/openandacceptance/bundle/state/force_pull_commandsare gated to darwin only (GOOS.windows = false,GOOS.linux = false) because they relied onexport PATH=.:$PATHplus a localopenstub to keep the real browser from launching. That trick is macOS-specific, and Go'sexec.LookPathrejects results from.anyway, which is why the captured output includedError: exec: "open": cannot run executable found relative to current directory.Pieter pointed out that
libs/browseralready honors$BROWSERand routes throughlibs/exec, so a fake browser command is portable across darwin/linux/windows.Changes
Before:
export PATH=.:$PATH+ localopenscript; tests gated to darwin; output captured a Go exec error as the assertion.Now:
export BROWSER=echo_browser.py; the stub prints the URL and exits 0; tests run on all three platforms; output shows a clean "Opening browser at " line (and the echoed URL where stdout isn't redirected to /dev/null).acceptance/bin/echo_browser.py: prints argv[1] and exits. Distinct from the existingbrowser.py, which performs an HTTP GET to close the OAuth callback loop in auth tests; that fetch would have pollutedout.requests.txtinforce_pull_commands.acceptance/bundle/open/: replace PATH trick withBROWSER=echo_browser.py, dropmusterr, delete the localopenstub, delete the test-localtest.toml(was only setting GOOS overrides).acceptance/bundle/state/force_pull_commands/: same script swap, drop GOOS overrides fromtest.toml, delete localopenstub.Test plan
go test ./acceptance -run "TestAccept/bundle/open$" -vpasses on darwin (bothdirectandterraformengines)go test ./acceptance -run "TestAccept/bundle/state/force_pull_commands$" -vpasses on darwin (both engines)go test ./acceptance -run "TestAccept/bundle/state/"passes (no neighbors broken)./task checks,./task fmt,./task lint-qcleanThis pull request and its description were written by Isaac.