Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: use isolated tmp dir for test storage instead of shared _build

Tests were sharing _build/storage.etf with the dev server, risking
cross-contamination. Now uses a unique tmp dir per test run, cleaned
up via ExUnit.after_suite.

sow-89

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+10 -1
+8
apps/garden/test/test_helper.exs
··· 1 1 ExUnit.start() 2 + 3 + ExUnit.after_suite(fn _results -> 4 + state_dir = Garden.Config.get().state_directory 5 + 6 + if String.starts_with?(state_dir, System.tmp_dir!()) do 7 + File.rm_rf!(state_dir) 8 + end 9 + end)
+2 -1
config/runtime.exs
··· 16 16 if Code.loaded?(Garden.Config) do 17 17 Garden.Config.load( 18 18 %{ 19 - state_directory: Path.expand("../_build", __DIR__), 19 + state_directory: 20 + Path.join(System.tmp_dir!(), "sower_test_#{System.system_time(:millisecond)}"), 20 21 subscriptions: [ 21 22 %{seed_name: "test1", seed_type: "nixos"}, 22 23 %{seed_name: "test1", seed_type: "home-manager"}