From 9d8eb6772a08525d5edc016d859f971c81d31344 Mon Sep 17 00:00:00 2001 From: Samuel Date: Thu, 30 Jul 2026 14:06:44 -0300 Subject: [PATCH] test: use the current triage VM slug, not the deprecated win10 one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sandbox tests dispatched 'triage' with vm_slug='win10-build-15063' at 8 call sites. That is not a valid triage VM: the server rewrites any slug containing 'win10' to 'windows11-21h2-x64' for backward compatibility and logs an ERROR each time it does. Every e2e run therefore carried 8 server-side ERROR lines that were entirely self-inflicted. Send the real slug instead. 'triage' offers windows11-21h2-x64 (plus ubuntu-22.04-amd64 and android-11-x64); the win10-style slug belongs to a different provider and does not apply here. Cassettes are deliberately NOT touched. vm_slug travels in the POST body and the VCR matcher is [method, scheme, host, port, path, query], so replay is unaffected — and hand-editing cassettes is against the recording convention. The old recorded bodies simply get refreshed the next time these cassettes are re-recorded delete-driven against a live stack. Verified: 13 sandbox/sample tests pass on replay. --- test/async_client_test.py | 8 ++++---- test/client_scan_test.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/async_client_test.py b/test/async_client_test.py index 266afa32..069569fb 100644 --- a/test/async_client_test.py +++ b/test/async_client_test.py @@ -437,7 +437,7 @@ async def test_async_sandboxtask_submit(self, uid): instance, _ = await submit_and_scan(api, uid, wait=False) task = await _dispatch_sandbox(api, instance.id, 'cape', 'win-10-build-19041', True) assert task.json['config']['network_enabled'] is True - task = await _dispatch_sandbox(api, instance.id, 'triage', 'win10-build-15063', False) + task = await _dispatch_sandbox(api, instance.id, 'triage', 'windows11-21h2-x64', False) assert task.sandbox == 'triage' assert task.json['config']['network_enabled'] is False @@ -446,7 +446,7 @@ async def test_async_sandboxtask_latest(self, uid): async with self._api() as api: instance, sha = await submit_and_scan(api, uid, wait=False) cape = await _dispatch_sandbox(api, instance.id, 'cape', 'win-10-build-19041', True) - triage = await _dispatch_sandbox(api, instance.id, 'triage', 'win10-build-15063', False) + triage = await _dispatch_sandbox(api, instance.id, 'triage', 'windows11-21h2-x64', False) # No cape/triage VMs in e2e — drive each task to SUCCEEDED by replaying # the sandbox worker's HTTP calls. Completing a task creates its @@ -472,7 +472,7 @@ async def test_async_sandboxtask_list(self, uid): # Dispatch cape + triage concurrently (distinct sandbox slugs, independent). await run_concurrently_async([ _dispatch_sandbox(api, instance.id, 'cape', 'win-10-build-19041', True), - _dispatch_sandbox(api, instance.id, 'triage', 'win10-build-15063', False), + _dispatch_sandbox(api, instance.id, 'triage', 'windows11-21h2-x64', False), ]) # Poll until the SandboxTaskSearchHash index sees both tasks. @@ -506,7 +506,7 @@ async def test_async_sample(self, uid): async with self._api() as api: instance, sha = await submit_and_scan(api, uid, wait=False) cape = await _dispatch_sandbox(api, instance.id, 'cape', 'win-10-build-19041', True) - triage = await _dispatch_sandbox(api, instance.id, 'triage', 'win10-build-15063', False) + triage = await _dispatch_sandbox(api, instance.id, 'triage', 'windows11-21h2-x64', False) await _complete_sandbox_task(cape.id, 'cape') await _complete_sandbox_task(triage.id, 'triage') diff --git a/test/client_scan_test.py b/test/client_scan_test.py index 44d7dc0f..b70924e9 100644 --- a/test/client_scan_test.py +++ b/test/client_scan_test.py @@ -802,7 +802,7 @@ def test_sandboxtask_submit(self): task = _dispatch_sandbox(v3api, instance.id, 'cape', 'win-10-build-19041', True) assert task.json['config']['network_enabled'] is True - task = _dispatch_sandbox(v3api, instance.id, 'triage', 'win10-build-15063', False) + task = _dispatch_sandbox(v3api, instance.id, 'triage', 'windows11-21h2-x64', False) assert task.sandbox == 'triage' assert task.json['config']['network_enabled'] is False @@ -815,7 +815,7 @@ def test_sandboxtask_latest(self): # is what sandbox_task_latest reads. instance, sha256 = submit_and_scan(v3api, self._testMethodName, wait=False) cape = _dispatch_sandbox(v3api, instance.id, 'cape', 'win-10-build-19041', True) - triage = _dispatch_sandbox(v3api, instance.id, 'triage', 'win10-build-15063', False) + triage = _dispatch_sandbox(v3api, instance.id, 'triage', 'windows11-21h2-x64', False) # _complete_sandbox_task waits (event-driven) for the sandbox service to # register each just-dispatched task before driving it to SUCCEEDED. @@ -839,7 +839,7 @@ def test_sandboxtask_list(self): # Dispatch cape + triage concurrently (distinct sandbox slugs, independent). run_concurrently([ lambda: _dispatch_sandbox(v3api, instance.id, 'cape', 'win-10-build-19041', True), - lambda: _dispatch_sandbox(v3api, instance.id, 'triage', 'win10-build-15063', False), + lambda: _dispatch_sandbox(v3api, instance.id, 'triage', 'windows11-21h2-x64', False), ]) # Poll until the SandboxTaskSearchHash index sees both tasks. @@ -876,7 +876,7 @@ def test_sample(self): uid = self._testMethodName instance, sha = submit_and_scan(api, uid, wait=False) cape = _dispatch_sandbox(api, instance.id, 'cape', 'win-10-build-19041', True) - triage = _dispatch_sandbox(api, instance.id, 'triage', 'win10-build-15063', False) + triage = _dispatch_sandbox(api, instance.id, 'triage', 'windows11-21h2-x64', False) _complete_sandbox_task(cape.id, 'cape') _complete_sandbox_task(triage.id, 'triage')