mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 10:48:03 +00:00
tests: improve example munet test
Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
parent
08253740ef
commit
a88f3c2d1c
@ -4,4 +4,4 @@ service integrated-vtysh-config
|
|||||||
interface eth0
|
interface eth0
|
||||||
ip address 10.0.1.1/24
|
ip address 10.0.1.1/24
|
||||||
|
|
||||||
ip route 10.0.0.0/8 blackhole
|
ip route 10.0.2.0/24 10.0.1.2
|
||||||
|
@ -5,6 +5,4 @@ interface eth0
|
|||||||
ip address 10.0.1.2/24
|
ip address 10.0.1.2/24
|
||||||
|
|
||||||
interface eth1
|
interface eth1
|
||||||
ip address 10.0.2.2/24
|
ip address 10.0.2.2/24
|
||||||
|
|
||||||
ip route 10.0.0.0/8 blackhole
|
|
@ -4,4 +4,4 @@ service integrated-vtysh-config
|
|||||||
interface eth0
|
interface eth0
|
||||||
ip address 10.0.2.3/24
|
ip address 10.0.2.3/24
|
||||||
|
|
||||||
ip route 10.0.0.0/8 blackhole
|
ip route 10.0.1.0/24 10.0.2.2
|
@ -5,6 +5,22 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2023, LabN Consulting, L.L.C.
|
# Copyright (c) 2023, LabN Consulting, L.L.C.
|
||||||
#
|
#
|
||||||
|
from munet.testing.util import retry
|
||||||
|
|
||||||
|
|
||||||
|
@retry(retry_timeout=10)
|
||||||
|
def wait_for_route(r, p):
|
||||||
|
o = r.cmd_raises(f"ip route show {p}")
|
||||||
|
assert p in o
|
||||||
|
|
||||||
|
|
||||||
async def test_native_test(unet):
|
async def test_native_test(unet):
|
||||||
o = unet.hosts["r1"].cmd_nostatus("ip addr")
|
r1 = unet.hosts["r1"]
|
||||||
|
o = r1.cmd_nostatus("ip addr")
|
||||||
print(o)
|
print(o)
|
||||||
|
|
||||||
|
wait_for_route(r1, "10.0.2.0/24")
|
||||||
|
|
||||||
|
r1.cmd_raises("ping -c1 10.0.1.2")
|
||||||
|
r1.cmd_raises("ping -c1 10.0.2.2")
|
||||||
|
r1.cmd_raises("ping -c1 10.0.2.3")
|
||||||
|
Loading…
Reference in New Issue
Block a user