Skip to content

fix(tests): no test run deletes the checkout's generated compose fragment - #173

Merged
catinspace-au merged 1 commit into
mainfrom
fix/tests-never-write-the-checkout
Sep 28, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/tests-never-write-the-checkout

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

Running make check-tests on a live checkout deleted its docker-compose.instances.yml. Tests that call resolve_profile.main() redirected .profile.mk but not the instances fragment, and instances.write with nothing to write removes the file.

  • Measured on main d8ee7d1: planted a fragment, ran make check-tests (609 passed), fragment gone.
  • Fix: an autouse fixture in scripts/tests/conftest.py points both generated files at tmp_path for every test.
  • With the fix: same planted fragment survives unchanged (same sha256), 609 passed.

Done when no test run touches a generated file in the checkout.

…ment

Tests that drive resolve_profile.main() redirected .profile.mk but not the instances fragment, so a run on a live checkout deleted its docker-compose.instances.yml (instances.write with nothing to write removes the file). Measured on main d8ee7d1: a planted fragment was gone after make check-tests. An autouse fixture now points both generated files at tmp_path for every test; with it the planted fragment survives unchanged and 609 pass.
@catinspace-au
catinspace-au merged commit d921fff into main Sep 28, 2026
7 checks passed
@catinspace-au
catinspace-au deleted the fix/tests-never-write-the-checkout branch September 28, 2026 04:44
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.

1 participant