refactor: split _signal_bundle_reload per backend, move macos egress to macos_container
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user