Skip to content

fix(auto-updater): use unique temp directory per test - #265

Merged
baleen37 merged 2 commits into
mainfrom
fix/auto-updater-test-tempdir
Jan 31, 2026
Merged

fix(auto-updater): use unique temp directory per test#265
baleen37 merged 2 commits into
mainfrom
fix/auto-updater-test-tempdir

Conversation

@baleen37

Copy link
Copy Markdown
Owner

Fix test #6 failing in CI due to shared TEMP_DIR between tests.

Changed from using $$ (PID) to $BATS_TEST_NAME for unique temp directory per test.

@coderabbitai

coderabbitai Bot commented Jan 31, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@baleen37 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/auto-updater-test-tempdir

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@baleen37
baleen37 enabled auto-merge (squash) January 31, 2026 09:29
baleen37 and others added 2 commits January 31, 2026 18:30
This empty commit triggers a new release to properly include
the auto-updater fix from the previous release.

Co-Authored-By: Claude <noreply@anthropic.com>
Changed TEMP_DIR from using $$ (PID) to $BATS_TEST_NAME to ensure
each test has its own isolated temp directory. This fixes test #6
failing in CI due to shared state between tests.

Root cause: When BATS runs tests in the same process, $$ returns
the same PID for all tests, causing them to share the same TEMP_DIR.
This leads to race conditions where one test's teardown affects
another test's state.

Co-Authored-By: Claude <noreply@anthropic.com>
@baleen37
baleen37 force-pushed the fix/auto-updater-test-tempdir branch from f025dfc to 06c974c Compare January 31, 2026 09:30
@baleen37
baleen37 merged commit 8d11368 into main Jan 31, 2026
2 checks passed
@baleen37
baleen37 deleted the fix/auto-updater-test-tempdir branch January 31, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant