acceptance: fix force_pull_commands test on macOS#5212
Merged
simonfaltum merged 1 commit intomainfrom May 8, 2026
Merged
Conversation
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
mihaimitrea-db
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
The acceptance test added in #5028 was merged with CI red on every platform. Two follow-up issues:
print_requests.pycall becausebundle summarywithout--force-pullmakes zero HTTP requests, soout.requests.txtis never created after therm -fearlier in the script.print_requests.pythen exits withFile [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.git diff --exit-codecheck fails becauseout.test.tomlwas 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.pyexits 1, the rest of the test never runs.Now:
touch out.requests.txtbefore eachprint_requests.pycall so the helper sees an empty file and prints nothing, matching the expected output. Also regenerateout.test.tomlso it matches the current serialization format.Test plan
go test ./acceptance -run "TestAccept/bundle/state/force_pull_commands" -vpasses locally on darwin (bothdirectandterraformengines)go test ./acceptance -run "^TestAccept$" -only-out-test-tomlproduces no further diff./task checkscleanThis pull request and its description were written by Isaac.