diff options
author | Donald Sharp <sharpd@nvidia.com> | 2024-09-06 20:29:45 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2024-09-16 15:34:05 +0200 |
commit | 5a589217f873efaa7684a994c0c2b4ffebe28409 (patch) | |
tree | 5277fa2c92d065dce042f210fe700b9bce25d88d /tests | |
parent | Merge pull request #16798 from donaldsharp/zebra_more_vrf_debug_data (diff) | |
download | frr-5a589217f873efaa7684a994c0c2b4ffebe28409.tar.xz frr-5a589217f873efaa7684a994c0c2b4ffebe28409.zip |
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 <sharpd@nvidia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/topotests/bgp_default_originate/test_default_orginate_vrf.py | 8 | ||||
-rw-r--r-- | tests/topotests/lib/common_config.py | 2 |
2 files changed, 2 insertions, 8 deletions
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 1506b02e5..905c3e2b6 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 540a627c6..2cee5fdae 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 |