Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix test for closed ports (#668)
Jakub Novák74a6944140ec
diff --git a/packages/js-sdk/tests/sandbox/closed_port.test.ts b/packages/js-sdk/tests/sandbox/closed_port.test.tsindex baefe50dd..a1fc79f13 100644--- a/packages/js-sdk/tests/sandbox/closed_port.test.ts+++ b/packages/js-sdk/tests/sandbox/closed_port.test.ts@@ -41,9 +41,9 @@ test.skipIf(isDebug)('closed port in SDK', async () => {const resp = JSON.parse(resp_text)const [cleanedSbxId] = sbx.sandboxId.split('-')- assert.equal(resp.error, 'The sandbox is running but port is not open')+ assert.equal(resp.message, 'The sandbox is running but port is not open')assert.equal(cleanedSbxId, resp.sandboxId)- assert.equal(resp.port, `:${badPort}`)+ assert.equal(resp.port, badPort)})test.skipIf(isDebug)('closed port in browser ', async () => {diff --git a/packages/python-sdk/tests/async/sandbox_async/test_port_closed.py b/packages/python-sdk/tests/async/sandbox_async/test_port_closed.pyindex 8a14baad5..150530113 100644--- a/packages/python-sdk/tests/async/sandbox_async/test_port_closed.py+++ b/packages/python-sdk/tests/async/sandbox_async/test_port_closed.py@@ -47,8 +47,8 @@ async def test_port_closed(template):resp_text = response.textresp = json.loads(resp_text)cleaned_sbx_id = sbx.sandbox_id.split("-")[0]- assert resp["error"] == "The sandbox is running but port is not open"+ assert resp["message"] == "The sandbox is running but port is not open"assert cleaned_sbx_id == resp["sandboxId"]- assert resp["port"] == f":{bad_port}"+ assert resp["port"] == bad_portfinally:await sbx.kill()diff --git a/packages/python-sdk/tests/sync/sandbox_sync/test_port_closed.py b/packages/python-sdk/tests/sync/sandbox_sync/test_port_closed.pyindex 486accfea..7b30a820f 100644--- a/packages/python-sdk/tests/sync/sandbox_sync/test_port_closed.py+++ b/packages/python-sdk/tests/sync/sandbox_sync/test_port_closed.py@@ -47,8 +47,8 @@ def test_port_closed(template):resp_text = response.textresp = json.loads(resp_text)cleaned_sbx_id = sbx.sandbox_id.split("-")[0]- assert resp["error"] == "The sandbox is running but port is not open"+ assert resp["message"] == "The sandbox is running but port is not open"assert cleaned_sbx_id == resp["sandboxId"]- assert resp["port"] == f":{bad_port}"+ assert resp["port"] == bad_portfinally:sbx.kill()