You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(test): use os.tmpdir() for test temp directories
Tests were creating temp directories in $HOME (~/.sentry-cli-test-*)
and never cleaning up on crashes/SIGKILL, leaving dozens of leftover
dirs. The intermediate fix moved them to a project-local .test-tmp/
directory, but the correct location is the OS temp directory.
Changes:
- preload.ts: wipe $TMPDIR/sentry-cli-test/ at each run start, create
preload dir there. One-time migration cleans old $HOME leftovers.
- helpers.ts: export shared TEST_TMP_DIR constant using os.tmpdir()
- fixture.ts: remove dead tmpdir() function and unused imports
- upgrade tests: import TEST_TMP_DIR from helpers instead of computing
it independently with resolve()
- Fix 3 test files using wrong env var (SENTRY_CLI_CONFIG_DIR vs
SENTRY_CONFIG_DIR) and deleting it in afterEach
- Convert 5 test files to useTestConfigDir() for proper env restore
- Fix 2 DSN test files creating dirs directly in $HOME
- Redirect upgrade lock/release tests to temp dir
0 commit comments