mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-18 03:34:20 +00:00
fix: fix box intergration test
This commit is contained in:
@@ -153,9 +153,10 @@ async def test_session_persists_files(box_client: RemoteBoxRuntimeClient):
|
|||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_timeout_kills_command(box_client: RemoteBoxRuntimeClient):
|
async def test_timeout_kills_command(box_client: RemoteBoxRuntimeClient):
|
||||||
"""A long-running command is killed after timeout_sec."""
|
"""A long-running command is killed after timeout_sec."""
|
||||||
|
session_id = 'int-timeout'
|
||||||
spec = BoxSpec(
|
spec = BoxSpec(
|
||||||
cmd='sleep 120',
|
cmd='sleep 120',
|
||||||
session_id='int-timeout',
|
session_id=session_id,
|
||||||
workdir='/tmp',
|
workdir='/tmp',
|
||||||
timeout_sec=3,
|
timeout_sec=3,
|
||||||
image=_TEST_IMAGE,
|
image=_TEST_IMAGE,
|
||||||
@@ -165,6 +166,9 @@ async def test_timeout_kills_command(box_client: RemoteBoxRuntimeClient):
|
|||||||
assert result.status == BoxExecutionStatus.TIMED_OUT
|
assert result.status == BoxExecutionStatus.TIMED_OUT
|
||||||
assert result.exit_code is None
|
assert result.exit_code is None
|
||||||
|
|
||||||
|
sessions = await box_client.get_sessions()
|
||||||
|
assert all(session['session_id'] != session_id for session in sessions)
|
||||||
|
|
||||||
|
|
||||||
# ── 4. Network isolation ─────────────────────────────────────────────
|
# ── 4. Network isolation ─────────────────────────────────────────────
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user