test: skip live volume tests unless ENABLE_VOLUME_TESTS is set#1526
test: skip live volume tests unless ENABLE_VOLUME_TESTS is set#1526mishushakov wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit 7b99f1f. Bugbot is set up for automated code reviews on this repo. Configure here. |
Package ArtifactsBuilt from 794840e. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.31.1-skip-volume-tests-by-default.0.tgzCLI ( npm install ./e2b-cli-2.13.1-skip-volume-tests-by-default.0.tgzPython SDK ( pip install ./e2b-2.30.0+skip.volume.tests.by.default-py3-none-any.whl |
There was a problem hiding this comment.
Test-only gating; skips live volume tests unless ENABLE_VOLUME_TESTS is set, mirrored consistently across JS and Python SDKs.
Extended reasoning...
Overview
This PR touches only test scaffolding: packages/js-sdk/tests/setup.ts and packages/python-sdk/tests/conftest.py. It gates live volume tests (which create real volumes against the API) behind an ENABLE_VOLUME_TESTS env var. JS chains .skipIf(process.env.ENABLE_VOLUME_TESTS === undefined) onto the volumeTest fixture; Python adds a _skip_unless_volume_tests_enabled() helper invoked at the top of the sync and async volume fixtures. Mocked/unit volume tests are unaffected.
Security risks
None. Changes are confined to test setup files and do not touch production code paths, auth, crypto, or permissions.
Level of scrutiny
Low. This is a mechanical test-infra change with clear intent and symmetric implementation across the JS and async/sync Python SDKs, following the project convention of applying equivalent SDK changes across languages.
Other factors
The bug-hunting system found no issues. The JS refactor into a chained .extend().skipIf() preserves the existing try/finally teardown around use(volume). No changeset is present, but this is a test-only change with no user-facing behavior, so a version bump is not required.
Live volume tests create real volumes against the API; this gates them behind an
ENABLE_VOLUME_TESTSenv var so they skip by default. In the JS SDK, thevolumeTestfixture is chained with.skipIf(process.env.ENABLE_VOLUME_TESTS === undefined), skipping all oftests/volume/file.test.ts. In the Python SDK, thevolumeandasync_volumefixtures callpytest.skipwhen the env var is unset, gatingtests/{sync/volume_sync,async/volume_async}/test_file.py. Mocked and unit volume tests (msw-basedvolume.test.ts,test_volume.py,test_volume_content.py,test_volume_client.py,test_volume_connection_config.py) still run unconditionally. To run the live tests:ENABLE_VOLUME_TESTS=1 pnpm run testorENABLE_VOLUME_TESTS=1 poetry run pytest.🤖 Generated with Claude Code