From 241df1f835cc5ee99b357c6893213aee14951fd6 Mon Sep 17 00:00:00 2001 From: didericis Date: Sat, 6 Jun 2026 12:22:50 -0400 Subject: [PATCH] fix(tests): fix integration test failures from deprecated git key, missing wget, and wrong prompt path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test_sandbox_escape: migrate manifest fixture from deprecated `git` key to `git-gate` (PRD 0047) — `remotes` → `repos`, field names `Name`/`Upstream`/`IdentityFile` → `url`/`identity` - test_smolmachines_launch probes: replace `wget` (not in node:22-slim) with `curl -s --show-error --max-time 3` (installed in Dockerfile.claude) - test_smolmachines_launch prompt test: correct path /root/ → /home/node/ to match guest_home in smolmachines/prepare.py Co-Authored-By: Claude Sonnet 4.6 --- tests/integration/test_sandbox_escape.py | 9 ++++----- tests/integration/test_smolmachines_launch.py | 12 ++++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/integration/test_sandbox_escape.py b/tests/integration/test_sandbox_escape.py index 14a2e44..caece39 100644 --- a/tests/integration/test_sandbox_escape.py +++ b/tests/integration/test_sandbox_escape.py @@ -120,11 +120,10 @@ class TestSandboxEscape(unittest.TestCase): # is intentionally unreachable — the pre-receive # gitleaks hook must reject BEFORE git-gate # attempts the upstream push. - "git": {"remotes": { - "unreachable.invalid": { - "Name": "throwaway", - "Upstream": "ssh://git@unreachable.invalid:22/throwaway.git", - "IdentityFile": str(cls._key_path), + "git-gate": {"repos": { + "throwaway": { + "url": "ssh://git@unreachable.invalid:22/throwaway.git", + "identity": str(cls._key_path), }, }}, }, diff --git a/tests/integration/test_smolmachines_launch.py b/tests/integration/test_smolmachines_launch.py index b4ea4bd..513c11f 100644 --- a/tests/integration/test_smolmachines_launch.py +++ b/tests/integration/test_smolmachines_launch.py @@ -110,10 +110,10 @@ class TestSmolmachinesLaunch(unittest.TestCase): # (high-numbered) so we're confirming TSI refusal, not # just "no service listening." r = self.bottle.exec( - "wget -T 3 -t 1 -O - http://127.0.0.1:9 2>&1 || true" + "curl -s --show-error --max-time 3 http://127.0.0.1:9 2>&1 || true" ) - # `wget` to a denied destination produces a connect error. - # The exact phrasing varies (busybox vs gnu); we assert + # `curl` to a denied destination produces a connect error. + # The exact phrasing varies by curl version; we assert # the response is NOT the body of any real service. self.assertNotIn("hello-from-vm", r.stdout) self.assertTrue( @@ -126,10 +126,10 @@ class TestSmolmachinesLaunch(unittest.TestCase): def test_prompt_file_lands_in_guest(self): # provision_prompt copies the host-side prompt.txt into the - # guest at /root/.bot-bottle-prompt.txt. The content + # guest at /home/node/.bot-bottle-prompt.txt. The content # must match what the manifest declared so claude-code's # --append-system-prompt-file reads the right text. - r = self.bottle.exec("cat /root/.bot-bottle-prompt.txt") + r = self.bottle.exec("cat /home/node/.bot-bottle-prompt.txt") self.assertEqual(0, r.returncode, msg=r.stderr) self.assertEqual(_AGENT_PROMPT, r.stdout.rstrip("\n")) @@ -143,7 +143,7 @@ class TestSmolmachinesLaunch(unittest.TestCase): # connect fails, which is the property chunk 3 will # preserve once egress is actually running. r = self.bottle.exec( - f"wget -T 3 -t 1 -O - http://{self.plan.bundle_ip}:9099 " + f"curl -s --show-error --max-time 3 http://{self.plan.bundle_ip}:9099 " "2>&1 || true" ) self.assertTrue(