Skip to content

Commit 75fe8d6

Browse files
cursoragentalb-rl
andcommitted
Remove deprecated create_tunnel tests from smoketests
- Removed test_create_tunnel_deprecated from sync test suite - Removed test_create_tunnel_deprecated from async test suite - Tests for enable_tunnel endpoint remain in place as the recommended approach Co-authored-by: albert <alb-rl@users.noreply.github.com>
1 parent 8428682 commit 75fe8d6

File tree

2 files changed

+0
-58
lines changed

2 files changed

+0
-58
lines changed

tests/smoketests/sdk/test_async_devbox.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -437,35 +437,6 @@ async def test_create_ssh_key(self, async_sdk_client: AsyncRunloopSDK) -> None:
437437
finally:
438438
await devbox.shutdown()
439439

440-
@pytest.mark.timeout(TWO_MINUTE_TIMEOUT)
441-
async def test_create_tunnel_deprecated(self, async_sdk_client: AsyncRunloopSDK) -> None:
442-
"""Test creating a tunnel (deprecated - now creates v2 tunnel).
443-
444-
Note: The deprecated create_tunnel endpoint now creates v2 Portal tunnels
445-
which cannot be removed. They remain active until the devbox is stopped.
446-
Use enable_tunnel for creating v2 tunnels instead.
447-
"""
448-
devbox = await async_sdk_client.devbox.create(
449-
name=unique_name("sdk-async-devbox-tunnel"),
450-
launch_parameters={"resource_size_request": "SMALL", "keep_alive_time_seconds": 60 * 5},
451-
)
452-
453-
try:
454-
# Create tunnel (now creates v2 Portal tunnel)
455-
with pytest.warns(DeprecationWarning, match="create_tunnel is deprecated"):
456-
tunnel = await devbox.net.create_tunnel(port=8080)
457-
assert tunnel is not None
458-
assert tunnel.url is not None
459-
assert tunnel.port == 8080
460-
assert tunnel.devbox_id == devbox.id
461-
462-
# Verify tunnel persists in devbox info (v2 tunnels cannot be removed)
463-
info = await devbox.get_info()
464-
assert info.tunnel is not None
465-
assert info.tunnel.tunnel_key is not None
466-
finally:
467-
await devbox.shutdown()
468-
469440
@pytest.mark.timeout(TWO_MINUTE_TIMEOUT)
470441
async def test_create_with_tunnel_param(self, async_sdk_client: AsyncRunloopSDK) -> None:
471442
"""Test creating a devbox with tunnel configuration in create params."""

tests/smoketests/sdk/test_devbox.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -434,35 +434,6 @@ def test_create_ssh_key(self, sdk_client: RunloopSDK) -> None:
434434
finally:
435435
devbox.shutdown()
436436

437-
@pytest.mark.timeout(TWO_MINUTE_TIMEOUT)
438-
def test_create_tunnel_deprecated(self, sdk_client: RunloopSDK) -> None:
439-
"""Test creating a tunnel (deprecated - now creates v2 tunnel).
440-
441-
Note: The deprecated create_tunnel endpoint now creates v2 Portal tunnels
442-
which cannot be removed. They remain active until the devbox is stopped.
443-
Use enable_tunnel for creating v2 tunnels instead.
444-
"""
445-
devbox = sdk_client.devbox.create(
446-
name=unique_name("sdk-devbox-tunnel"),
447-
launch_parameters={"resource_size_request": "SMALL", "keep_alive_time_seconds": 60 * 5},
448-
)
449-
450-
try:
451-
# Create tunnel (now creates v2 Portal tunnel)
452-
with pytest.warns(DeprecationWarning, match="create_tunnel is deprecated"):
453-
tunnel = devbox.net.create_tunnel(port=8080)
454-
assert tunnel is not None
455-
assert tunnel.url is not None
456-
assert tunnel.port == 8080
457-
assert tunnel.devbox_id == devbox.id
458-
459-
# Verify tunnel persists in devbox info (v2 tunnels cannot be removed)
460-
info = devbox.get_info()
461-
assert info.tunnel is not None
462-
assert info.tunnel.tunnel_key is not None
463-
finally:
464-
devbox.shutdown()
465-
466437
@pytest.mark.timeout(TWO_MINUTE_TIMEOUT)
467438
def test_create_with_tunnel_param(self, sdk_client: RunloopSDK) -> None:
468439
"""Test creating a devbox with tunnel configuration in create params."""

0 commit comments

Comments
 (0)