]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: bgp_vpnv4_per_nexthop_label is failing
authorDonald Sharp <sharpd@nvidia.com>
Sat, 1 Jul 2023 17:29:27 +0000 (13:29 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 10 Jul 2023 13:06:40 +0000 (09:06 -0400)
The test is failing because it assumes a json key
is always present when it is not.  Test for it
before having the test fail.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/bgp_vpnv4_per_nexthop_label/test_bgp_vpnv4_per_nexthop_label.py

index 934c2ff16a6bcae665dde5da51e40efc654c5dd9..ce278ed7a7e81334cc603c7f08d8afa649b0b843 100644 (file)
@@ -242,6 +242,10 @@ def check_show_mpls_table(router, blacklist=None, label_list=None, whitelist=Non
         if label_list is not None:
             label_list.add(in_label)
         for nh in label_info["nexthops"]:
+            if "installed" not in nh.keys():
+                return "{} {} is not installed yet on {}".format(
+                    in_label, label_info, router.name
+                )
             if nh["installed"] != True or nh["type"] != "BGP":
                 return "{}, show mpls table, nexthop is not installed".format(
                     router.name