Commit b6edcf8
authored
acceptance: fix force_pull_commands test on macOS (#5212)
## Why
The acceptance test added in #5028 was merged with CI red on every
platform. Two follow-up issues:
1. **macOS**: the script bails at the first `print_requests.py` call
because `bundle summary` without `--force-pull` makes zero HTTP
requests, so `out.requests.txt` is never created after the `rm -f`
earlier in the script. `print_requests.py` then exits with `File
[TEST_TMP_DIR]/out.requests.txt not found`, and the rest of the script
never runs. The test only runs on darwin (`GOOS.windows = false`,
`GOOS.linux = false`), so this manifested as a macOS-only failure.
2. **Linux/Windows**: the post-test `git diff --exit-code` check fails
because `out.test.toml` was checked in using the older `[GOOS]` /
`[EnvMatrix]` table form, but the framework now serializes those keys in
dotted form.
## Changes
**Before:** `bundle summary` (no `--force-pull`) makes 0 requests, file
is missing, `print_requests.py` exits 1, the rest of the test never
runs.
**Now:** `touch out.requests.txt` before each `print_requests.py` call
so the helper sees an empty file and prints nothing, matching the
expected output. Also regenerate `out.test.toml` so it matches the
current serialization format.
## Test plan
- [x] `go test ./acceptance -run
"TestAccept/bundle/state/force_pull_commands" -v` passes locally on
darwin (both `direct` and `terraform` engines)
- [x] `go test ./acceptance -run "^TestAccept$" -only-out-test-toml`
produces no further diff
- [x] `./task checks` clean
This pull request and its description were written by Isaac.1 parent f0edaa4 commit b6edcf8
2 files changed
Lines changed: 11 additions & 7 deletions
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 | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
| 28 | + | |
21 | 29 | | |
0 commit comments