Skip to content

acceptance: fix force_pull_commands test on macOS#5212

Merged
simonfaltum merged 1 commit intomainfrom
simonfaltum/force-pull-fix-followup
May 8, 2026
Merged

acceptance: fix force_pull_commands test on macOS#5212
simonfaltum merged 1 commit intomainfrom
simonfaltum/force-pull-fix-followup

Conversation

@simonfaltum
Copy link
Copy Markdown
Member

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

  • go test ./acceptance -run "TestAccept/bundle/state/force_pull_commands" -v passes locally on darwin (both direct and terraform engines)
  • go test ./acceptance -run "^TestAccept$" -only-out-test-toml produces no further diff
  • ./task checks clean

This pull request and its description were written by Isaac.

The test was merged in #5028 with CI red on every platform. On macOS the
script bails at the first `print_requests.py` because `bundle summary`
without `--force-pull` makes zero HTTP requests, so `out.requests.txt`
is never created after the `rm -f`. Touch the file 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` in the current dotted-key format; the
checked-in file used the older `[GOOS]` / `[EnvMatrix]` table form,
making the post-test `git diff --exit-code` fail on linux/windows.

Co-authored-by: Isaac
@simonfaltum simonfaltum temporarily deployed to test-trigger-is May 7, 2026 18:25 — with GitHub Actions Inactive
@simonfaltum simonfaltum temporarily deployed to test-trigger-is May 7, 2026 18:25 — with GitHub Actions Inactive
@simonfaltum simonfaltum merged commit b6edcf8 into main May 8, 2026
23 of 24 checks passed
@simonfaltum simonfaltum deleted the simonfaltum/force-pull-fix-followup branch May 8, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants