Commit 3fe2d04
authored
acceptance: drop darwin-only gate from bundle open + force_pull_commands (#5217)
## Why
Follow-up to #5212. Both `acceptance/bundle/open` and
`acceptance/bundle/state/force_pull_commands` are gated to darwin only
(`GOOS.windows = false`, `GOOS.linux = false`) because they relied on
`export PATH=.:$PATH` plus a local `open` stub to keep the real browser
from launching. That trick is macOS-specific, and Go's `exec.LookPath`
rejects results from `.` anyway, which is why the captured output
included `Error: exec: "open": cannot run executable found relative to
current directory`.
Pieter pointed out that `libs/browser` already honors `$BROWSER` and
routes through `libs/exec`, so a fake browser command is portable across
darwin/linux/windows.
## Changes
**Before:** `export PATH=.:$PATH` + local `open` script; 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 <url>" line (and the echoed URL where stdout isn't redirected
to /dev/null).
- New `acceptance/bin/echo_browser.py`: prints argv[1] and exits.
Distinct from the existing `browser.py`, which performs an HTTP GET to
close the OAuth callback loop in auth tests; that fetch would have
polluted `out.requests.txt` in `force_pull_commands`.
- `acceptance/bundle/open/`: replace PATH trick with
`BROWSER=echo_browser.py`, drop `musterr`, delete the local `open` stub,
delete the test-local `test.toml` (was only setting GOOS overrides).
- `acceptance/bundle/state/force_pull_commands/`: same script swap, drop
GOOS overrides from `test.toml`, delete local `open` stub.
## Test plan
- [x] `go test ./acceptance -run "TestAccept/bundle/open$" -v` passes on
darwin (both `direct` and `terraform` engines)
- [x] `go test ./acceptance -run
"TestAccept/bundle/state/force_pull_commands$" -v` passes on darwin
(both engines)
- [x] `go test ./acceptance -run "TestAccept/bundle/state/" ` passes (no
neighbors broken)
- [x] `./task checks`, `./task fmt`, `./task lint-q` clean
- [ ] Linux + Windows CI on this PR
This pull request and its description were written by Isaac.1 parent 8d8565d commit 3fe2d04
11 files changed
Lines changed: 31 additions & 29 deletions
File tree
- acceptance
- bin
- bundle
- open
- state/force_pull_commands
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
This file was deleted.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
0 commit comments