@@ -438,25 +438,31 @@ async def test_create_ssh_key(self, async_sdk_client: AsyncRunloopSDK) -> None:
438438 await devbox .shutdown ()
439439
440440 @pytest .mark .timeout (TWO_MINUTE_TIMEOUT )
441- async def test_create_and_remove_tunnel (self , async_sdk_client : AsyncRunloopSDK ) -> None :
442- """Test creating and removing a tunnel."""
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+ """
443448 devbox = await async_sdk_client .devbox .create (
444449 name = unique_name ("sdk-async-devbox-tunnel" ),
445450 launch_parameters = {"resource_size_request" : "SMALL" , "keep_alive_time_seconds" : 60 * 5 },
446451 )
447452
448453 try :
449- # Create tunnel
454+ # Create tunnel (now creates v2 Portal tunnel)
450455 with pytest .warns (DeprecationWarning , match = "create_tunnel is deprecated" ):
451456 tunnel = await devbox .net .create_tunnel (port = 8080 )
452457 assert tunnel is not None
453458 assert tunnel .url is not None
454459 assert tunnel .port == 8080
455460 assert tunnel .devbox_id == devbox .id
456461
457- # Remove tunnel
458- with pytest .warns (DeprecationWarning , match = "remove_tunnel is deprecated" ):
459- await devbox .net .remove_tunnel (port = 8080 )
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
460466 finally :
461467 await devbox .shutdown ()
462468
0 commit comments