fix: A1-16 keep public project content out of repo via per-user content location and machine-local project registry
This commit is contained in:
@@ -2,6 +2,16 @@ cache_root = Path.join(System.tmp_dir!(), "bds-test-cache-#{System.unique_intege
|
||||
File.mkdir_p!(cache_root)
|
||||
Application.put_env(:bds, :project_cache_root, cache_root)
|
||||
|
||||
# Public, user-owned default project content lives under a per-user default
|
||||
# content location — never the repo or the private app dir. Tests redirect it
|
||||
# to a throwaway temp dir so first-launch defaults never touch the developer's
|
||||
# home directory.
|
||||
content_root =
|
||||
Path.join(System.tmp_dir!(), "bds-test-content-#{System.unique_integer([:positive])}")
|
||||
|
||||
File.mkdir_p!(content_root)
|
||||
Application.put_env(:bds, :default_content_root, content_root)
|
||||
|
||||
Enum.each(["LC_ALL", "LC_MESSAGES", "LANG"], fn variable ->
|
||||
System.put_env(variable, "en_US.UTF-8")
|
||||
end)
|
||||
@@ -10,6 +20,7 @@ ExUnit.start()
|
||||
|
||||
ExUnit.after_suite(fn _results ->
|
||||
File.rm_rf(cache_root)
|
||||
File.rm_rf(content_root)
|
||||
end)
|
||||
|
||||
Ecto.Adapters.SQL.Sandbox.mode(BDS.Repo, :manual)
|
||||
|
||||
Reference in New Issue
Block a user