test: fix integration coverage failures

This commit is contained in:
2026-06-25 04:39:43 -04:00
parent 446414144e
commit c2ddac1be5
2 changed files with 8 additions and 4 deletions
+7 -4
View File
@@ -92,9 +92,9 @@ class TestSandboxEscape(unittest.TestCase):
"on PATH: curl -sSL https://smolmachines.com/install.sh | sh" "on PATH: curl -sSL https://smolmachines.com/install.sh | sh"
) )
# Throwaway "identity file" for the git-gate's `identity` field. # Throwaway static key for the git-gate fixture. It need not
# It need not be a real SSH key: test 5 reaches gitleaks before # be a real SSH key: test 5 reaches gitleaks before any SSH
# any SSH attempt anyway. # attempt anyway.
fd, kp = tempfile.mkstemp(prefix="sandbox-test-key.") fd, kp = tempfile.mkstemp(prefix="sandbox-test-key.")
os.close(fd) os.close(fd)
cls._key_path = Path(kp) cls._key_path = Path(kp)
@@ -123,7 +123,10 @@ class TestSandboxEscape(unittest.TestCase):
"git-gate": {"repos": { "git-gate": {"repos": {
"throwaway": { "throwaway": {
"url": "ssh://git@unreachable.invalid:22/throwaway.git", "url": "ssh://git@unreachable.invalid:22/throwaway.git",
"identity": str(cls._key_path), "key": {
"provider": "static",
"path": str(cls._key_path),
},
}, },
}}, }},
}, },
@@ -198,6 +198,7 @@ class TestSmolmachinesLaunch(unittest.TestCase):
# connect fails, which is the property chunk 3 will # connect fails, which is the property chunk 3 will
# preserve once egress is actually running. # preserve once egress is actually running.
r = self.bottle.exec( r = self.bottle.exec(
"env -u HTTPS_PROXY -u HTTP_PROXY -u https_proxy -u http_proxy "
f"curl -s --show-error --max-time 3 http://{self.plan.bundle_ip}:9099 " f"curl -s --show-error --max-time 3 http://{self.plan.bundle_ip}:9099 "
"2>&1 || true" "2>&1 || true"
) )