test: require TEST_PR_ID for write integration tests to prevent accidental mutations
Write tests no longer pick a random open PR. RUN_WRITE_TESTS=true alone is not sufficient — TEST_PR_ID must also be set, otherwise each write test is skipped with a warning. Added try/finally cleanup blocks so approval/comment/task state is always restored even on assertion failures. Updated .env.example and README to document the new requirement. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
11
.env.example
Normal file
11
.env.example
Normal file
@@ -0,0 +1,11 @@
|
||||
BITBUCKET_MCP_EMAIL=your_email@example.com
|
||||
BITBUCKET_MCP_TOKEN=your_api_token
|
||||
DEFAULT_WORKSPACE=your-workspace
|
||||
DEFAULT_REPO=your-repo
|
||||
|
||||
# Integration test write operations
|
||||
# Set RUN_WRITE_TESTS=true to enable tests that create/modify/delete data.
|
||||
# TEST_PR_ID must also be set — write tests will only run against this specific PR
|
||||
# to avoid accidentally modifying unrelated pull requests.
|
||||
# RUN_WRITE_TESTS=true
|
||||
# TEST_PR_ID=123
|
||||
Reference in New Issue
Block a user