Skip to content

test: skip live volume tests unless ENABLE_VOLUME_TESTS is set#1526

Open
mishushakov wants to merge 1 commit into
mainfrom
skip-volume-tests-by-default
Open

test: skip live volume tests unless ENABLE_VOLUME_TESTS is set#1526
mishushakov wants to merge 1 commit into
mainfrom
skip-volume-tests-by-default

Conversation

@mishushakov

Copy link
Copy Markdown
Member

Live volume tests create real volumes against the API; this gates them behind an ENABLE_VOLUME_TESTS env var so they skip by default. In the JS SDK, the volumeTest fixture is chained with .skipIf(process.env.ENABLE_VOLUME_TESTS === undefined), skipping all of tests/volume/file.test.ts. In the Python SDK, the volume and async_volume fixtures call pytest.skip when the env var is unset, gating tests/{sync/volume_sync,async/volume_async}/test_file.py. Mocked and unit volume tests (msw-based volume.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 test or ENABLE_VOLUME_TESTS=1 poetry run pytest.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7b99f1f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cursor

cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only gating with no production or SDK runtime behavior changes.

Overview
Live volume tests that create real API volumes now skip by default unless ENABLE_VOLUME_TESTS is set. The JS SDK chains .skipIf(process.env.ENABLE_VOLUME_TESTS === undefined) onto the volumeTest fixture so tests using it (for example tests/volume/file.test.ts) do not run without the env var. The Python SDK adds _skip_unless_volume_tests_enabled() and invokes it at the start of the volume and async_volume fixtures. The JS change also fixes the volumeTest fixture so volume teardown runs inside a proper try/finally around use(volume).

Reviewed by Cursor Bugbot for commit 7b99f1f. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 794840e. Download artifacts from this workflow run.

JS SDK (e2b@2.31.1-skip-volume-tests-by-default.0):

npm install ./e2b-2.31.1-skip-volume-tests-by-default.0.tgz

CLI (@e2b/cli@2.13.1-skip-volume-tests-by-default.0):

npm install ./e2b-cli-2.13.1-skip-volume-tests-by-default.0.tgz

Python SDK (e2b==2.30.0+skip-volume-tests-by-default):

pip install ./e2b-2.30.0+skip.volume.tests.by.default-py3-none-any.whl

@mishushakov mishushakov enabled auto-merge (squash) July 3, 2026 17:10

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant