summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2025-02-14 11:58:24 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2025-02-27 09:43:58 +0100
commit6ffdc7bb9fe5b8e1be15f2c4652942d20e81fca5 (patch)
treea35a11429429da2c1f99ba0aa7277157e8f11840
parentfa0b951771a6d1ed9eef2d2714c1d969e4fb5d72 (diff)
tests: check as number in show run
Creates the default VRF instance after the other VRF instances. The default VRF instance is created in hidden state. Check that AS number in show run is correctly written. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> (cherry picked from commit 077a2b0dfc71443b41d5feceb52023c259436956) Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
-rw-r--r--tests/topotests/bgp_vrf_route_leak_basic/r1/bgpd.conf14
-rw-r--r--tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py10
2 files changed, 17 insertions, 7 deletions
diff --git a/tests/topotests/bgp_vrf_route_leak_basic/r1/bgpd.conf b/tests/topotests/bgp_vrf_route_leak_basic/r1/bgpd.conf
index 397f7938d2..8363e2bc99 100644
--- a/tests/topotests/bgp_vrf_route_leak_basic/r1/bgpd.conf
+++ b/tests/topotests/bgp_vrf_route_leak_basic/r1/bgpd.conf
@@ -1,12 +1,5 @@
hostname r1
-router bgp 99
- no bgp ebgp-requires-policy
- address-family ipv4 unicast
- redistribute connected
- import vrf DONNA
- !
-!
router bgp 99 vrf DONNA
no bgp ebgp-requires-policy
address-family ipv4 unicast
@@ -31,3 +24,10 @@ router bgp 99 vrf ZITA
network 172.16.101.0/24
!
!
+router bgp 99
+ no bgp ebgp-requires-policy
+ address-family ipv4 unicast
+ redistribute connected
+ import vrf DONNA
+ !
+!
diff --git a/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py b/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py
index 6d4b436bcc..61c62cafa6 100644
--- a/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py
+++ b/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py
@@ -64,6 +64,16 @@ def teardown_module(mod):
tgen.stop_topology()
+def test_router_bgp_as_pretty():
+ tgen = get_topogen()
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ output = tgen.gears["r1"].vtysh_cmd("show run")
+ assert "router bgp 99\n" in output, "router bgp 99 not found in show run"
+
+
def test_vrf_route_leak_donna():
logger.info("Ensure that routes are leaked back and forth")
tgen = get_topogen()