mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-09 18:41:55 +00:00
37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
|
#!/usr/bin/python3
|
||
|
|
||
|
import asyncio
|
||
|
from python.BIRD.Test import Test, BIRDInstance
|
||
|
from python.BIRD.LogChecker import LogExpectedStub
|
||
|
|
||
|
class ThisTest(Test):
|
||
|
async def prepare(self):
|
||
|
# Set epoch
|
||
|
|
||
|
# Prepare machines and links
|
||
|
await self.machines(
|
||
|
*[ f"m{n}" for n in range(1,9) ],
|
||
|
t=BIRDInstance,
|
||
|
)
|
||
|
|
||
|
for m in self.machine_index.values():
|
||
|
m.conf = "template.conf"
|
||
|
m.default_log_checker.expected += [
|
||
|
LogExpectedStub(f"{m.logprefix} <INFO> Chosen router ID .*")
|
||
|
]
|
||
|
|
||
|
await asyncio.gather(*[
|
||
|
self.link("ve31", "m3", "m1"),
|
||
|
self.link("ve12", "m1", "m2"),
|
||
|
self.link("ve23", "m2", "m3"),
|
||
|
self.link("ve57", "m5", "m7"),
|
||
|
self.link("ve78", "m7", "m8"),
|
||
|
self.link("ve86", "m8", "m6"),
|
||
|
self.link("multi", "m3", "m4", "m5", "m6"),
|
||
|
])
|
||
|
|
||
|
async def test(self):
|
||
|
# Startup check
|
||
|
await self.route_dump(30, "startup")
|
||
|
|