test: add local 2x2 route topology

This commit is contained in:
2026-07-23 03:14:16 +00:00
parent 10e803eaee
commit a66269cb69
27 changed files with 775 additions and 7 deletions
+18
View File
@@ -134,6 +134,24 @@ class SyncthingRouteManagerTests(unittest.TestCase):
)
self.assertEqual(json.loads(peer_ack.read_text())["nonce"], "peer-nonce")
local_nonce = configured.local_path / (
".archive-control-route-nonce.cache-1"
)
before = (local_nonce.stat(), peer_ack.stat())
repeated = self.manager.verify(
configured,
self.spec,
"cache-1",
"local-nonce",
time.monotonic() + 1,
)
after = (local_nonce.stat(), peer_ack.stat())
self.assertEqual(repeated, (True, True))
self.assertEqual(
[(item.st_ino, item.st_mtime_ns) for item in before],
[(item.st_ino, item.st_mtime_ns) for item in after],
)
def test_verification_times_out_without_peer_evidence(self):
configured = self.manager.configure(self.spec, time.monotonic() + 1)
with self.assertRaises(RouteSetupTimeout):