summaryrefslogtreecommitdiff
path: root/tests/topotests/static_routing_with_ibgp
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-03-21 13:30:08 +0200
committerGitHub <noreply@github.com>2023-03-21 13:30:08 +0200
commit2e1ea892220dccb8a4c72e438cb3bbd4cac22b2b (patch)
treed2de4faad97baab57577f63d47e3f25ae76f465a /tests/topotests/static_routing_with_ibgp
parent0c462d6c88ad255139d71792f9ff1856c531cab9 (diff)
parent1155a66246b8aa0cd3587565841090a03f8cc7cf (diff)
Merge pull request #12816 from gpnaveen/stc_rte_err_msg
tests: Enhance error msgs for static route automation.
Diffstat (limited to 'tests/topotests/static_routing_with_ibgp')
-rw-r--r--tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py84
-rw-r--r--tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py84
-rw-r--r--tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py30
-rw-r--r--tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py12
4 files changed, 97 insertions, 113 deletions
diff --git a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py
index 176ce7e48b..abae75e76e 100644
--- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py
+++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py
@@ -206,7 +206,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
step("Configure IBGP IPv4 peering between R2 and R3 router.")
step("Configure redistribute static in BGP on R2 router")
@@ -261,7 +261,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: routes are still present in RIB".format(
tc_name
)
@@ -271,7 +271,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
step("Configure the static route with nexthop N1")
@@ -328,7 +328,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: routes are still present in RIB".format(
tc_name
)
@@ -338,7 +338,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
step("Configure the static route with nexthop N2")
input_dict_4 = {
@@ -371,7 +371,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
nh = NEXT_HOP_IP["nh1"][addr_type]
result = verify_rib(
@@ -385,7 +385,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: routes are still present in RIB".format(
tc_name
)
@@ -395,7 +395,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Route is still present in RIB".format(
tc_name
)
@@ -410,7 +410,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Route is still present in RIB".format(
tc_name
)
@@ -421,20 +421,20 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
dut = "r3"
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
assert (
result is True
- ), "Testcase {} : Failed \nError: Route is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Route is missing in RIB".format(tc_name)
result = verify_rib(
tgen, addr_type, dut, input_dict_4, protocol=protocol, expected=False
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Route is still present in RIB".format(
tc_name
)
@@ -453,7 +453,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
step("Shut nexthop interface N2")
intf = topo["routers"]["r2"]["links"]["r1-link1"]["interface"]
@@ -477,7 +477,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: routes are still present in RIB".format(
tc_name
)
@@ -489,20 +489,20 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
dut = "r3"
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
assert (
result is True
- ), "Testcase {} : Failed \nError: Route is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Route is missing in RIB".format(tc_name)
result = verify_rib(
tgen, addr_type, dut, input_dict_4, protocol=protocol, expected=False
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Route is still present in RIB".format(
tc_name
)
@@ -521,20 +521,20 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
dut = "r3"
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
assert (
result is True
- ), "Testcase {} : Failed \nError: Route is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Route is missing in RIB".format(tc_name)
result = verify_rib(
tgen, addr_type, dut, input_dict_4, protocol=protocol, expected=False
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Route is still present in RIB".format(
tc_name
)
@@ -554,13 +554,13 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
dut = "r3"
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
assert (
result is True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Route is still present in RIB".format(
tc_name
)
@@ -569,7 +569,7 @@ def test_static_route_2nh_p0_tc_1_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Route is still present in RIB".format(
tc_name
)
@@ -645,7 +645,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" "missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
rte2_nh2 = {
"r2": {
@@ -673,7 +673,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are not active in RIB".format(tc_name)
step("Configure IBGP IPv4 peering between R2 and R3 router.")
step("Explicit route is added in R3 for R2 nexthop rechability")
@@ -764,7 +764,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
rte2_nh2 = {
"r2": {
@@ -783,7 +783,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are not active in RIB".format(tc_name)
step("Configure the static route with nexthop N1")
rte1_nh1 = {
@@ -838,7 +838,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: routes are still present in RIB".format(
tc_name
)
@@ -848,7 +848,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
step("Configure the static route with nexthop N2")
rte2_nh2 = {
@@ -888,7 +888,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: routes are still present in RIB".format(
tc_name
)
@@ -898,7 +898,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
step("No shut the nexthop interface N1")
shutdown_bringup_interface(tgen, dut, intf, True)
@@ -914,7 +914,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
step("Shut nexthop interface N2")
intf = topo["routers"]["r2"]["links"]["r1-link1"]["interface"]
@@ -938,7 +938,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: routes are still present in RIB".format(
tc_name
)
@@ -948,7 +948,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
step("No shut nexthop interface N2")
shutdown_bringup_interface(tgen, dut, intf, True)
@@ -976,7 +976,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" "missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
rte2_nh2 = {
"r2": {
@@ -1004,7 +1004,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are not active in RIB".format(tc_name)
dut = "r3"
protocol = "bgp"
@@ -1021,7 +1021,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are not active in RIB".format(tc_name)
dut = "r2"
step("Reload the FRR router")
@@ -1053,14 +1053,14 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" "missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
dut = "r3"
protocol = "bgp"
result = verify_bgp_rib(tgen, addr_type, dut, rte1_nh1, next_hop=nh)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" "missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are missing in RIB".format(tc_name)
rte2_nh2 = {
"r2": {
@@ -1088,14 +1088,14 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are not active in RIB".format(tc_name)
dut = "r3"
protocol = "bgp"
result = verify_bgp_rib(tgen, addr_type, dut, rte2_nh2, next_hop=nh)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are not active in RIB".format(tc_name)
result = verify_rib(
tgen,
@@ -1109,7 +1109,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: routes are not active in RIB".format(tc_name)
write_test_footer(tc_name)
diff --git a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py
index 20c68dc25f..820a736ad7 100644
--- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py
+++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py
@@ -283,7 +283,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Configure redistribute static in BGP on R2 router")
for addr_type in ADDR_TYPES:
@@ -308,7 +308,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step(
"Remove the static route configured with nexthop N1 to N8, one"
@@ -355,7 +355,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed\nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed\nError: routes are still present in RIB".format(
tc_name
)
@@ -384,9 +384,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed\nError: Routes are" " missing in RIB".format(
- tc_name
- )
+ ), "Testcase {} : Failed\nError: Routes are missing in RIB".format(tc_name)
protocol = "static"
step("Random shut of the nexthop interfaces")
@@ -432,7 +430,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Remove random static route with all the nexthop")
dut = "r2"
@@ -471,7 +469,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
for addr_type in ADDR_TYPES:
input_dict_4 = {
@@ -525,7 +523,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Remove the redistribute static knob")
for addr_type in ADDR_TYPES:
@@ -560,7 +558,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Routes are still present in RIB".format(
tc_name
)
@@ -644,7 +642,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
nh = []
for nhp in range(2, 9):
@@ -662,7 +660,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes " " are present in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are present in RIB".format(tc_name)
step(
"Remove the static route configured with nexthop N1 to N8, one"
@@ -707,9 +705,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still present in RIB".format(
- tc_name
- )
+ ), "Testcase {} : Failed \nError: Routes are still present in RIB".format(tc_name)
step("Configure the static route with nexthop N1 to N8, one by one")
@@ -757,7 +753,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
nh = []
for nhp in range(2, 9):
nh.append(NEXT_HOP_IP["nh" + str(nhp)][addr_type])
@@ -774,7 +770,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes " " are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Random shut of the nexthop interfaces")
randnum = random.randint(0, 7)
@@ -803,7 +799,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \n" "Error: Routes are still present in RIB".format(
+ ), "Testcase {} : Failed \n Error: Routes are still present in RIB".format(
tc_name
)
@@ -817,7 +813,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \n" "Error: Routes are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \n Error: Routes are missing in RIB".format(tc_name)
protocol = "bgp"
# this is next hop reachability route in r3 as we are using ibgp
@@ -844,7 +840,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ibgp(request):
result = verify_rib(tgen, addr_type, dut, input_dict_4, protocol=protocol)
assert (
result is True
- ), "Testcase {} : Failed \n" "Error: Routes are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \n Error: Routes are missing in RIB".format(tc_name)
protocol = "static"
dut = "r2"
@@ -1051,7 +1047,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
nh = []
for nhp in range(2, 9):
@@ -1068,7 +1064,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes " " are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step(
"Remove the static route configured with nexthop N1 to N8, one"
@@ -1113,9 +1109,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still present in RIB".format(
- tc_name
- )
+ ), "Testcase {} : Failed \nError: Routes are still present in RIB".format(tc_name)
step("Configure the static route with nexthop N1 to N8, one by one")
@@ -1163,7 +1157,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
nh = []
for nhp in range(2, 9):
nh.append(NEXT_HOP_IP["nh" + str(nhp)][addr_type])
@@ -1179,7 +1173,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes " " are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Random shut of the nexthop interfaces")
randnum = random.randint(0, 7)
@@ -1208,7 +1202,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \n" "Error: Routes are still present in RIB".format(
+ ), "Testcase {} : Failed \n Error: Routes are still present in RIB".format(
tc_name
)
@@ -1222,7 +1216,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \n" "Error: Routes are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \n Error: Routes are missing in RIB".format(tc_name)
dut = "r2"
protocol = "bgp"
@@ -1251,7 +1245,7 @@ def test_static_route_8nh_diff_AD_ibgp_ecmp_p1_tc7_ibgp(request):
result = verify_rib(tgen, addr_type, dut, input_dict_4, protocol=protocol)
assert (
result is True
- ), "Testcase {} : Failed \n" "Error: Routes are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \n Error: Routes are missing in RIB".format(tc_name)
protocol = "static"
dut = "r2"
@@ -1458,7 +1452,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Verify that highest AD nexthop are inactive")
nh = []
@@ -1477,7 +1471,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes " " are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Configure redistribute static in BGP on R2 router")
for addr_type in ADDR_TYPES:
@@ -1541,7 +1535,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Routes are still present in RIB".format(
tc_name
)
@@ -1572,15 +1566,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
" value and all the nexthop populated in RIB and FIB again"
)
for addr_type in ADDR_TYPES:
- input_dict_4 = {
- "r2": {
- "static_routes": [
- {
- "network": PREFIX1[addr_type],
- }
- ]
- }
- }
+ input_dict_4 = {"r2": {"static_routes": [{"network": PREFIX1[addr_type]}]}}
nh = NEXT_HOP_IP["nh1"][addr_type]
result = verify_rib(
tgen, addr_type, dut, input_dict_4, next_hop=nh, protocol=protocol, fib=True
@@ -1617,7 +1603,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \n" "Error: Routes are still present in RIB".format(
+ ), "Testcase {} : Failed \n Error: Routes are still present in RIB".format(
tc_name
)
@@ -1631,7 +1617,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \n" "Error: Routes are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \n Error: Routes are missing in RIB".format(tc_name)
step("Remove random static route with all the nexthop")
for addr_type in ADDR_TYPES:
@@ -1767,7 +1753,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Routes are still present in RIB".format(
tc_name
)
@@ -1865,7 +1851,7 @@ def test_static_route_delete_p0_tc11_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Verify that highest AD nexthop are inactive")
nh = []
@@ -1883,7 +1869,7 @@ def test_static_route_delete_p0_tc11_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes " " are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Configure redistribute static in BGP on R2 router")
for addr_type in ADDR_TYPES:
@@ -1937,7 +1923,7 @@ def test_static_route_delete_p0_tc11_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Routes are still present in RIB".format(
tc_name
)
@@ -2008,7 +1994,7 @@ def test_static_route_delete_p0_tc11_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still active in RIB".format(
+ ), "Testcase {} : Failed \nError: Routes are still active in RIB".format(
tc_name
)
diff --git a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py
index 7f35927311..1ad963f314 100644
--- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py
+++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py
@@ -261,7 +261,7 @@ def test_staticroute_with_ecmp_p0_tc3_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Configure redistribute static in BGP on R2 router")
for addr_type in ADDR_TYPES:
input_dict_2 = {
@@ -316,11 +316,11 @@ def test_staticroute_with_ecmp_p0_tc3_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still present in RIB".format(
+ ), "Testcase {} : Failed \nError: Routes are still present in RIB".format(
tc_name
)
- step("Configure the static route with nexthop N1 to N8, one by" "one")
+ step("Configure the static route with nexthop N1 to N8, one by one")
for addr_type in ADDR_TYPES:
# add static routes
@@ -347,7 +347,7 @@ def test_staticroute_with_ecmp_p0_tc3_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
step("Random shut of the nexthop interfaces")
randnum = random.randint(0, 7)
@@ -376,7 +376,7 @@ def test_staticroute_with_ecmp_p0_tc3_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \n" "Error: Routes are still present in RIB".format(
+ ), "Testcase {} : Failed \n Error: Routes are still present in RIB".format(
tc_name
)
@@ -390,7 +390,7 @@ def test_staticroute_with_ecmp_p0_tc3_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \n" "Error: Routes are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \n Error: Routes are missing in RIB".format(tc_name)
step("Reload the FRR router")
# stop/start -> restart FRR router and verify
@@ -402,7 +402,7 @@ def test_staticroute_with_ecmp_p0_tc3_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes are" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Routes are missing in RIB".format(tc_name)
write_test_footer(tc_name)
@@ -591,11 +591,9 @@ def test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes are" " still present in RIB".format(
- tc_name
- )
+ ), "Testcase {} : Failed \nError: Routes are still present in RIB".format(tc_name)
- step("Configure the static route with nexthop N1 to N8, one by" "one")
+ step("Configure the static route with nexthop N1 to N8, one by one")
for addr_type in ADDR_TYPES:
# add static routes
for nhp in range(1, 9):
@@ -684,7 +682,7 @@ def test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ibgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \n" "Error: Routes are still present in RIB".format(
+ ), "Testcase {} : Failed \n Error: Routes are still present in RIB".format(
tc_name
)
@@ -698,7 +696,7 @@ def test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ibgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed \n" "Error: Routes are missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \n Error: Routes are missing in RIB".format(tc_name)
step("Reload the FRR router")
# stop/start -> restart FRR router and verify
@@ -852,7 +850,7 @@ def test_bgp_local_nexthop_p1_tc14_ibgp(request):
result = verify_rib(tgen, addr_type, dut, input_dict_4)
assert (
result is True
- ), "Testcase {} : Failed \nError: Routes is" " missing in RIB of R2".format(
+ ), "Testcase {} : Failed \nError: routes are missing in RIB of R2".format(
tc_name
)
@@ -860,13 +858,13 @@ def test_bgp_local_nexthop_p1_tc14_ibgp(request):
dut = "r3"
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4, expected=False)
assert result is not True, (
- "Testcase {} : Failed \nError: Routes is"
+ "Testcase {} : Failed \nError: routes are"
" still present in BGP RIB of R2".format(tc_name)
)
result = verify_rib(tgen, addr_type, dut, input_dict_4, expected=False)
assert result is not True, (
- "Testcase {} : Failed \nError: Routes is"
+ "Testcase {} : Failed \nError: routes are"
" still present in RIB of R2".format(tc_name)
)
diff --git a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py
index e50362b571..0378240959 100644
--- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py
+++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py
@@ -200,12 +200,12 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ibgp(request):
)
clear_bgp(tgen, addr_type, "r2")
- step(" All BGP nbrs are down as authentication is mismatch on both" " the sides")
+ step(" All BGP nbrs are down as authentication is mismatch on both the sides")
bgp_convergence = verify_bgp_convergence(tgen, topo, expected=False)
assert (
bgp_convergence is not True
- ), "Testcase {} : " "Failed \n BGP nbrs must be down. Error: {}".format(
+ ), "Testcase {} : Failed \n BGP nbrs must be down. Error: {}".format(
tc_name, bgp_convergence
)
@@ -252,7 +252,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ibgp(request):
step("All BGP nbrs are up as authentication is matched now")
bgp_convergence = verify_bgp_convergence(tgen, topo)
- assert bgp_convergence is True, "Testcase {} : Failed \n " "Error: {}".format(
+ assert bgp_convergence is True, "Testcase {} : Failed \n Error: {}".format(
tc_name, bgp_convergence
)
@@ -302,7 +302,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ibgp(request):
"show ip prefix list"
)
result = verify_prefix_lists(tgen, input_dict_2)
- assert result is not True, "Testcase {} : Failed \n" " Error: {}".format(
+ assert result is not True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result
)
@@ -405,7 +405,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ibgp(request):
tc_name, result
)
- step("Apply prefix list P1 on BGP neighbors 1 2 3 4 connected from " "frr r1")
+ step("Apply prefix list P1 on BGP neighbors 1 2 3 4 connected from frr r1")
# Configure prefix list to bgp neighbor
input_dict_4 = {
"r2": {
@@ -919,7 +919,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ibgp(request):
)
assert (
result4 is not True
- ), "Testcase {} : Failed \n" "routes are still present \n Error: {}".format(
+ ), "Testcase {} : Failed \n routes are still present \n Error: {}".format(
tc_name, result4
)