test: add local 2x2 route topology
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user