fix: centralize test data directories to project_root/.tmp#544
Merged
dengwx2009 merged 1 commit intomasterfrom Mar 3, 2026
Merged
fix: centralize test data directories to project_root/.tmp#544dengwx2009 merged 1 commit intomasterfrom
dengwx2009 merged 1 commit intomasterfrom
Conversation
Add test_workdir fixture in root conftest.py that redirects all ROCK_*_DIR env vars to .tmp/test_data/, fixing PermissionError on /data paths in non-container environments. - Set env vars at module import time for config.py constants - Set both env_vars module attrs and os.environ for subprocess inheritance - Remove scattered overrides from test_model_service.py and test_close_session.py - Fix test_envs.py to test raw defaults via delattr Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dengwx2009
approved these changes
Mar 3, 2026
zhongwen666
pushed a commit
to zhongwen666/ROCK
that referenced
this pull request
Mar 3, 2026
…) (alibaba#544) Add test_workdir fixture in root conftest.py that redirects all ROCK_*_DIR env vars to .tmp/test_data/, fixing PermissionError on /data paths in non-container environments. - Set env vars at module import time for config.py constants - Set both env_vars module attrs and os.environ for subprocess inheritance - Remove scattered overrides from test_model_service.py and test_close_session.py - Fix test_envs.py to test raw defaults via delattr Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_workdirsession fixture in rootconftest.pythat redirects allROCK_*_DIRenv vars toproject_root/.tmp/test_data/PermissionError: [Errno 13] Permission denied: '/data'in unit tests (e.g.test_chat_completions_routing_success)test_model_service.pyandtest_close_session.pyTest plan
test_chat_completions_routing_successpasses (was failing with PermissionError)ruff check)fixes #543
🤖 Generated with Claude Code