Repository navigation
test(setup): keep DATA_DIR and LOG_DIR inside each fork's own directory - #1650
Conversation
Test forks set only WORKSPACE_PATH, so DATA_DIR and LOG_DIR fell back to ./data and ./data/logs in the checkout. Point both at the fork's own temp directory, which is already removed on exit. Fixes snapotter-hq#1649
# Conflicts: # tests/setup/per-fork-env.ts
Setting DATA_DIR per fork discarded any DATA_DIR the caller exported, so REQUIRE_AI_FEATURES=1 runs could no longer find the bundles installed there and every installed-AI contract failed with feature_not_installed. forkDataDir() keeps the caller's DATA_DIR only in that lane; every other run still gets its own <forkDir>/data. LOG_DIR stays per fork always. tests/README.md drops the now-ignored DATA_DIR export and documents the exception.
|
Two changes went onto this branch before merge, plus the merge of main. Setting
The conflict with #1651 was both PRs adding env vars to the same block of Looked at and left alone:
|
|
Thanks @drakeo338. Each test fork now keeps its data and logs in its own temp directory, so parallel files stop sharing AI bundle state and a local run no longer leaves I added one thing on top: with |
What does this PR do?
Fixes #1649.
The per-fork test setup pointed the workspace and files paths at the fork's temp directory but left DATA_DIR and LOG_DIR unset, so tests created ./data and ./data/logs in the checkout. This sets both under the per-fork directory, which is already removed on exit, and adds an assertion to the fork-dir helper test.
Type of change
Checklist
pnpm test)pnpm typecheck)Unticked items were not run on this commit (only the unit tests around the fork directory were, and they pass).
Screenshots (if applicable)
Not applicable, no UI change.