test(mesh): pin the controller's key across a rerun

Without the fix its public half changes on every write, which is what made
the hub re-render and re-key a tunnel nothing had asked to rotate.
This commit is contained in:
evangelostsak committed 2026-09-28 15:44:30 +02:00
1 parent 10cb6d979c
commit 7634c1ed32
1 file changed
+8
@@ -103,6 +103,14 @@ class TestMeshCli(unittest.TestCase):
with self.assertRaises(SystemExit):
main(self._argv("--endpoint", "swarm-mgr-01"))
def test_a_rerun_keeps_the_controller_key_too(self):
argv = self._argv("--controller", CONTROLLER, "--controller-mesh", "swarm")
self.assertEqual(main(argv), 0)
before = self._text(CONTROLLER)
self.assertEqual(main(argv), 0)
self.assertEqual(self._text(CONTROLLER), before)
def test_a_rerun_is_a_no_op(self):
self.assertEqual(main(self._argv()), 0)
before = {host: self._text(host) for host in HOSTS}