fix(tests): use bare mktemp -d instead of hardcoded /tmp paths#203
fix(tests): use bare mktemp -d instead of hardcoded /tmp paths#203timothy-20 wants to merge 1 commit intofrankbria:mainfrom
Conversation
3 test files hardcoded /tmp/ralph-* paths in mktemp, causing 'Operation not permitted' in sandboxed environments. Bare mktemp -d uses the system default temp directory, consistent with the other 15 test files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
WalkthroughThe pull request standardizes temporary directory creation across three test files by replacing explicit mktemp directory templates with generic Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
Replace hardcoded
/tmppaths in tests with baremktemp -dfor cross-platform portability.Some test files used
mktemp -d /tmp/ralph_test.XXXXXXwhich fails on systems where/tmpdoesn't exist or is mounted differently (e.g., macOS uses/private/tmp). Using baremktemp -dlets the OS choose the appropriate temporary directory.Changes
tests/unit/test_exit_detection.bats— remove/tmpprefix from mktemptests/unit/test_rate_limiting.bats— remove/tmpprefix from mktemptests/unit/test_edge_cases.bats— remove/tmpprefix from mktempTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit