Test runs remove their data directory (#8) #10
Loading…
Reference in a new issue
No description provided.
Delete branch "mercurius/8-test-tmp-dirs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (fix): a test run leaves no data directory in the system temp dir.
Refs #8, Refs #4
What changes
config/runtime.exs(:testbranch only) registersSystem.at_exit(fn _ -> File.rm_rf(dir) end)for the exact directory it made for this run. It globs nothing, and a non-test run never registers it.It lives here, not in each app's test_helper: the umbrella's
mix testruns every app's suite in one VM, which evaluates this file once. A per-appafter_suitewould delete the directory under the next app's open stores. The runs below showafter_suitecallbacks piling up across the apps.Proof (msi00, ci image)
Format, compile
--warnings-as-errorsand credo--strictare clean.Landed by fast-forward: phoenix main is
e9cc237263, this PR's head (PASS r=1, CI 6136 + 6137). Closed rather than merged: this repository does not allow the manually-merged style.Pull request closed