Skip to content

Commit 2b15fa6

Browse files
alb-rlcursoragent
andauthored
chore: fix smoketest tunnel removal (#735)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: albert <alb-rl@users.noreply.github.com>
1 parent 842c9bc commit 2b15fa6

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

tests/smoketests/object-oriented/devbox.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,24 +263,26 @@ describe('smoketest: object-oriented devbox', () => {
263263
await devbox.shutdown();
264264
});
265265

266-
test('create and remove legacy tunnel (deprecated)', async () => {
266+
test('create legacy tunnel (deprecated - now creates v2 tunnel)', async () => {
267267
const devbox = await sdk.devbox.create({
268268
name: uniqueName('sdk-devbox-tunnel'),
269269
launch_parameters: { resource_size_request: 'X_SMALL', keep_alive_time_seconds: 60 * 5 }, // 5 minutes
270270
});
271271

272272
try {
273-
// Create legacy tunnel using deprecated createTunnel method
273+
// Create tunnel using deprecated createTunnel method (now creates v2 tunnel)
274274
const tunnel = await devbox.net.createTunnel({ port: 8080 });
275275

276-
// Verify the legacy tunnel response structure
276+
// Verify the tunnel response structure
277277
expect(tunnel).toBeDefined();
278278
expect(tunnel.devbox_id).toBe(devbox.id);
279279
expect(tunnel.port).toBe(8080);
280280
expect(tunnel.url).toBeDefined();
281281

282-
// Remove legacy tunnel
283-
await devbox.net.removeTunnel({ port: 8080 });
282+
// Note: v2 tunnels cannot be removed - they remain active until devbox shutdown
283+
// Verify the tunnel is accessible via devbox info
284+
const info = await devbox.getInfo();
285+
expect(info.tunnel).toBeDefined();
284286
} finally {
285287
await devbox.shutdown();
286288
}

0 commit comments

Comments
 (0)