refactor: split _signal_bundle_reload per backend, move macos egress to macos_container
lint / lint (push) Successful in 1m47s
test / unit (pull_request) Successful in 38s
test / integration (pull_request) Successful in 19s

This commit is contained in:
2026-06-23 05:57:07 +00:00
parent 5606797ac2
commit 7a991e1f5e
4 changed files with 80 additions and 69 deletions
-27
View File
@@ -97,33 +97,6 @@ class TestApplyRoutesChange(unittest.TestCase):
calls[0],
)
def test_updates_legacy_routes_file_when_existing_bottle_mounted_it(self):
legacy_path = (
Path(self._tmp.name)
/ ".bot-bottle/state/dev/egress/egress_routes.yaml"
)
legacy_path.parent.mkdir(parents=True)
legacy_path.write_text("routes: []\n", encoding="utf-8")
with patch(
"bot_bottle.backend.docker.egress_apply.subprocess.run",
return_value=SimpleNamespace(returncode=0, stdout="", stderr=""),
):
before, after = apply_routes_change(
"dev",
"routes:\n - host: google.com\n",
)
self.assertEqual("routes: []\n", before)
self.assertEqual("routes:\n - host: google.com\n", after)
self.assertEqual(
"routes:\n - host: google.com\n",
legacy_path.read_text(encoding="utf-8"),
)
self.assertFalse(
(Path(self._tmp.name) / ".bot-bottle/state/dev/egress/routes.yaml").exists(),
)
if __name__ == "__main__":
unittest.main()