From 5a589217f873efaa7684a994c0c2b4ffebe28409 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 6 Sep 2024 14:29:45 -0400 Subject: tests: When finding nexthops ensure that they are active Do not accept a nexthop as valid unless it is marked as being active. Signed-off-by: Donald Sharp --- .../topotests/bgp_default_originate/test_default_orginate_vrf.py | 8 +------- tests/topotests/lib/common_config.py | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/topotests/bgp_default_originate/test_default_orginate_vrf.py b/tests/topotests/bgp_default_originate/test_default_orginate_vrf.py index 1506b02e5d..905c3e2b66 100644 --- a/tests/topotests/bgp_default_originate/test_default_orginate_vrf.py +++ b/tests/topotests/bgp_default_originate/test_default_orginate_vrf.py @@ -546,13 +546,7 @@ def test_verify_default_originate_route_with_non_default_VRF_p1(request): tc_name, result ) - result = verify_rib( - tgen, - addr_type, - "r2", - static_routes_input, - next_hop=DEFAULT_ROUTE_NXT_HOP_R1[addr_type], - ) + result = verify_rib(tgen, addr_type, "r2", static_routes_input) assert result is True, "Testcase {} : Failed \n Error: {}".format( tc_name, result ) diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 540a627c65..2cee5fdaed 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -3371,7 +3371,7 @@ def verify_rib( found_hops = [ rib_r["ip"] for rib_r in rib_routes_json[st_rt][0]["nexthops"] - if "ip" in rib_r + if "ip" in rib_r and "active" in rib_r ] # If somehow key "ip" is not found in nexthops JSON -- cgit v1.2.3