test: fix unit test failures after main rebase
lint / lint (push) Failing after 1m58s
test / unit (pull_request) Failing after 57s
test / integration (pull_request) Successful in 18s
test / coverage (pull_request) Failing after 56s

- test_egress: expect MissingEnvVarError instead of Die for missing/empty token refs
- test_git_gate, test_git_gate_render_provision: expect MissingEnvVarError instead of RuntimeError for missing forge token
- test_smolmachines_provision: handle 2 exec calls (mkdir -p + chmod/update-ca-certificates) in provision_ca
- test_smolmachines_smolvm: update machine create/delete argv assertions to --name flag form (smolvm 1.4.7+)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 23:46:47 -04:00
parent afd943c4f9
commit 3703b6f59f
5 changed files with 16 additions and 13 deletions
+6 -5
View File
@@ -79,7 +79,7 @@ class TestArgvShapes(unittest.TestCase):
with self._patch_run() as m:
machine_create("agent-xyz")
self.assertEqual(
["smolvm", "machine", "create", "agent-xyz"],
["smolvm", "machine", "create", "--name", "agent-xyz"],
m.call_args.args[0],
)
@@ -103,7 +103,8 @@ class TestArgvShapes(unittest.TestCase):
self.assertIn("192.168.50.2/32", argv)
self.assertIn("-e", argv)
self.assertIn("HTTPS_PROXY=http://192.168.50.2:8888", argv)
self.assertEqual("agent-xyz", argv[-1])
self.assertIn("--name", argv)
self.assertIn("agent-xyz", argv)
def test_machine_create_omits_net_when_no_allow_cidrs(self):
with self._patch_run() as m:
@@ -127,13 +128,13 @@ class TestArgvShapes(unittest.TestCase):
m.call_args.args[0],
)
def test_machine_delete_uses_positional_name_and_force(self):
# delete NAME is positional; -f required so no interactive
def test_machine_delete_uses_name_flag_and_force(self):
# delete uses --name flag; -f required so no interactive
# confirmation blocks teardown.
with self._patch_run() as m:
machine_delete("agent-xyz")
self.assertEqual(
["smolvm", "machine", "delete", "-f", "agent-xyz"],
["smolvm", "machine", "delete", "--name", "agent-xyz", "-f"],
m.call_args.args[0],
)