summaryrefslogtreecommitdiff
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
parent0c462d6c88ad255139d71792f9ff1856c531cab9 (diff)
parent1155a66246b8aa0cd3587565841090a03f8cc7cf (diff)
Merge pull request #12816 from gpnaveen/stc_rte_err_msg
tests: Enhance error msgs for static route automation.
-rw-r--r--tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py120
-rw-r--r--tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py92
-rw-r--r--tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py46
-rw-r--r--tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py12
-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
8 files changed, 226 insertions, 254 deletions
diff --git a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py
index 63c0a86897..46777d7b4b 100644
--- a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py
+++ b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py
@@ -207,7 +207,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
)
assert (
result is True
- ), "Testcase {} : Failed" "Error: Routes is missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed Error: 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")
@@ -262,7 +262,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed" "Error: Routes is still present in RIB".format(
+ ), "Testcase {} : Failed Expected: Routes should not present in RIB \nError: Routes are still present in RIB".format(
tc_name
)
@@ -272,7 +272,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(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")
@@ -293,7 +293,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
tc_name, result
)
- step("Remove the static route configured with nexthop N2 from" "running config")
+ step("Remove the static route configured with nexthop N2 from running config")
input_dict_4 = {
"r2": {
@@ -329,7 +329,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Routes are still present in RIB".format(
tc_name
)
@@ -339,7 +339,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(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 = {
@@ -372,7 +372,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(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(
@@ -386,7 +386,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Routes are still present in RIB".format(
tc_name
)
@@ -396,7 +396,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Route is still present in RIB".format(
tc_name
)
@@ -411,7 +411,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \n Expected: Routes should not present in RIB \nError: Route is still present in RIB".format(
tc_name
)
@@ -422,20 +422,20 @@ def test_static_route_2nh_p0_tc_1_ebgp(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 \nExpected: Routes should not present in RIB \nError: Route is still present in RIB".format(
tc_name
)
@@ -454,7 +454,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(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"]
@@ -478,7 +478,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Routes are still present in RIB".format(
tc_name
)
@@ -490,20 +490,20 @@ def test_static_route_2nh_p0_tc_1_ebgp(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 \nExpected: Routes should not present in RIB \nError: Route is still present in RIB".format(
tc_name
)
@@ -522,20 +522,20 @@ def test_static_route_2nh_p0_tc_1_ebgp(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 \nExpected: Routes should not present in RIB \nError: Route is still present in RIB".format(
tc_name
)
@@ -555,13 +555,13 @@ def test_static_route_2nh_p0_tc_1_ebgp(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
)
@@ -570,7 +570,7 @@ def test_static_route_2nh_p0_tc_1_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Route is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Route is still present in RIB".format(
tc_name
)
@@ -646,7 +646,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(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": {
@@ -674,7 +674,9 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \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")
@@ -715,7 +717,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
tc_name, result
)
- step("Remove the static route configured with nexthop N1 from" "running config")
+ step("Remove the static route configured with nexthop N1 from running config")
rt1_nh1 = {
"r2": {
"static_routes": [
@@ -765,7 +767,9 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Routes are missing in RIB".format(
+ tc_name
+ )
rte2_nh2 = {
"r2": {
@@ -784,7 +788,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(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 = {
@@ -804,7 +808,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
tc_name, result
)
- step("Remove the static route configured with nexthop N2 from" "running config")
+ step("Remove the static route configured with nexthop N2 from running config")
rte2_nh2 = {
"r2": {
"static_routes": [
@@ -839,7 +843,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Routes are still present in RIB".format(
tc_name
)
@@ -849,7 +853,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(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 = {
@@ -889,7 +893,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Routes are still present in RIB".format(
tc_name
)
@@ -899,7 +903,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(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)
@@ -915,7 +919,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(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"]
@@ -939,7 +943,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" " still present in RIB".format(
+ ), "Testcase {} : Failed \nExpected: Routes should not present in RIB \nError: Routes are still present in RIB".format(
tc_name
)
@@ -949,7 +953,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(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)
@@ -977,7 +981,7 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(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": {
@@ -1005,7 +1009,9 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nExpected: Routes should not active in RIB \nError: Routes are not active in RIB".format(
+ tc_name
+ )
dut = "r3"
protocol = "bgp"
@@ -1022,7 +1028,9 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nExpected: Routes should not be active in RIB \nError: Routes are not active in RIB".format(
+ tc_name
+ )
dut = "r2"
step("Reload the FRR router")
@@ -1054,14 +1062,14 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(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": {
@@ -1089,14 +1097,16 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nExpected: Routes should not be active in RIB \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,
@@ -1110,7 +1120,9 @@ def test_static_route_2nh_admin_dist_p0_tc_2_ebgp(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes is" "not active in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nExpected: Routes should not be active in RIB \nError: Routes are not active in RIB".format(
+ tc_name
+ )
write_test_footer(tc_name)
@@ -1182,7 +1194,7 @@ def test_same_rte_from_bgp_static_p0_tc5_ebgp(request):
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
)
@@ -1191,7 +1203,7 @@ def test_same_rte_from_bgp_static_p0_tc5_ebgp(request):
result = verify_rib(tgen, addr_type, dut, input_dict_4, protocol=protocol)
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
)
@@ -1246,9 +1258,7 @@ def test_same_rte_from_bgp_static_p0_tc5_ebgp(request):
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
assert (
result is True
- ), "Testcase {} : Failed \nError: Route is" " missing in BGP RIB".format(
- tc_name
- )
+ ), "Testcase {} : Failed \nError: Route is missing in BGP RIB".format(tc_name)
protocol = "bgp"
result = verify_rib(
@@ -1256,9 +1266,9 @@ def test_same_rte_from_bgp_static_p0_tc5_ebgp(request):
)
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)
- step("Remove the static route on R3 configured with active" "interface")
+ step("Remove the static route on R3 configured with active interface")
for addr_type in ADDR_TYPES:
input_dict_4 = {
"r3": {
@@ -1293,9 +1303,7 @@ def test_same_rte_from_bgp_static_p0_tc5_ebgp(request):
result = verify_bgp_rib(tgen, addr_type, dut, input_dict_4)
assert (
result is True
- ), "Testcase {} : Failed \nError: Route is" " missing in BGP RIB".format(
- tc_name
- )
+ ), "Testcase {} : Failed \nError: Route is missing in BGP RIB".format(tc_name)
protocol = "bgp"
result = verify_rib(
@@ -1303,7 +1311,7 @@ def test_same_rte_from_bgp_static_p0_tc5_ebgp(request):
)
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)
write_test_footer(tc_name)
diff --git a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py
index 530c49f6bf..e01351506d 100644
--- a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py
+++ b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py
@@ -281,7 +281,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(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:
@@ -306,7 +306,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(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"
@@ -353,7 +353,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(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
)
@@ -382,9 +382,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(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")
@@ -392,7 +390,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(request):
# Shutdown interface
dut = "r2"
step(
- " interface which is about to be shut no shut between r1 and r2 is " "%s",
+ " interface which is about to be shut no shut between r1 and r2 is %s",
topo["routers"]["r2"]["links"]["r1-link{}".format(randnum)]["interface"],
)
intf = topo["routers"]["r2"]["links"]["r1-link{}".format(randnum)]["interface"]
@@ -430,7 +428,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(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"
@@ -469,7 +467,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(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 = {
@@ -523,7 +521,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(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:
@@ -558,7 +556,7 @@ def test_static_rte_with_8ecmp_nh_p1_tc9_ebgp(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
)
@@ -642,7 +640,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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):
@@ -660,7 +658,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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"
@@ -705,9 +703,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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")
@@ -755,7 +751,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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])
@@ -772,7 +768,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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)
@@ -801,7 +797,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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
)
@@ -815,7 +811,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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 = "static"
@@ -824,7 +820,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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 = "bgp"
dut = "r3"
@@ -833,7 +829,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(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)
step("Reload the FRR router")
# stop/start -> restart FRR router and verify
@@ -846,7 +842,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc6_ebgp(request):
result = verify_rib(tgen, addr_type, dut, input_dict_4, protocol=protocol)
assert (
result is 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
)
@@ -945,7 +941,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(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):
@@ -962,7 +958,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(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"
@@ -1007,9 +1003,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(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")
@@ -1057,7 +1051,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(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])
@@ -1073,7 +1067,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(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)
@@ -1102,7 +1096,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(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
)
@@ -1116,7 +1110,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(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 = "static"
@@ -1132,7 +1126,7 @@ def test_static_route_8nh_diff_AD_ebgp_ecmp_p1_tc8_ebgp(request):
result = verify_rib(tgen, addr_type, dut, input_dict_4, protocol=protocol)
assert (
result is 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
)
@@ -1231,7 +1225,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(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 = []
@@ -1250,7 +1244,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(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:
@@ -1314,7 +1308,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(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
)
@@ -1345,15 +1339,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(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
@@ -1390,7 +1376,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(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
)
@@ -1404,7 +1390,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(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:
@@ -1494,9 +1480,7 @@ def test_static_route_8nh_diff_AD_bgp_ecmp_p1_tc10_ebgp(request):
)
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)
write_test_footer(tc_name)
@@ -1592,7 +1576,7 @@ def test_static_route_delete_p0_tc11_ebgp(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 = []
@@ -1610,7 +1594,7 @@ def test_static_route_delete_p0_tc11_ebgp(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:
@@ -1664,7 +1648,7 @@ def test_static_route_delete_p0_tc11_ebgp(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
)
@@ -1735,7 +1719,7 @@ def test_static_route_delete_p0_tc11_ebgp(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_ebgp/test_static_routes_topo3_ebgp.py b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py
index 358047607a..9d35b7dcd3 100644
--- a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py
+++ b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py
@@ -262,7 +262,7 @@ def test_staticroute_with_ecmp_p0_tc3_ebgp(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 = {
@@ -317,11 +317,11 @@ def test_staticroute_with_ecmp_p0_tc3_ebgp(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
@@ -348,7 +348,7 @@ def test_staticroute_with_ecmp_p0_tc3_ebgp(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)
@@ -377,7 +377,7 @@ def test_staticroute_with_ecmp_p0_tc3_ebgp(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
)
@@ -391,7 +391,7 @@ def test_staticroute_with_ecmp_p0_tc3_ebgp(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
@@ -403,7 +403,7 @@ def test_staticroute_with_ecmp_p0_tc3_ebgp(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)
@@ -592,11 +592,9 @@ def test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ebgp(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):
@@ -685,7 +683,7 @@ def test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ebgp(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
)
@@ -699,7 +697,7 @@ def test_staticroute_with_ecmp_with_diff_AD_p0_tc4_ebgp(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
@@ -812,7 +810,7 @@ def test_bgp_local_nexthop_p1_tc14_ebgp(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
)
@@ -820,13 +818,13 @@ def test_bgp_local_nexthop_p1_tc14_ebgp(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)
)
@@ -890,7 +888,7 @@ def test_frr_intf_name_as_gw_gap_tc4_ebgp_p0(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)
input_dict_nh = {
"r1": {
@@ -904,7 +902,7 @@ def test_frr_intf_name_as_gw_gap_tc4_ebgp_p0(request):
result = verify_ip_nht(tgen, input_dict_nh)
assert (
result is True
- ), "Testcase {} : Failed \nError: Nexthop is" " missing in RIB".format(tc_name)
+ ), "Testcase {} : Failed \nError: Nexthop is missing in RIB".format(tc_name)
step(
"Shut / no shut IPv4 and IPv6 static next hop interface from"
@@ -928,7 +926,7 @@ def test_frr_intf_name_as_gw_gap_tc4_ebgp_p0(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)
shutdown_bringup_interface(tgen, dut, intf, True)
@@ -974,9 +972,7 @@ def test_frr_intf_name_as_gw_gap_tc4_ebgp_p0(request):
)
assert (
result is not True
- ), "Testcase {} : Failed \nError: Routes" " still present in RIB".format(
- tc_name
- )
+ ), "Testcase {} : Failed \nError: Routes still present in RIB".format(tc_name)
write_test_footer(tc_name)
@@ -1002,7 +998,7 @@ def test_static_route_with_tag_p0_tc_13_ebgp(request):
"Configure 2 IPv4 static route (S1 and S2) in R2 with same"
"next hop N1 28.1.1.2"
)
- step("Configure static route S1 with tag 1 and static route S2 with" "tag2")
+ step("Configure static route S1 with tag 1 and static route S2 with tag2")
step("S1= ip route 10.1.1.1/24 28.1.1.2 tag 1")
step("S2= ip route 20.1.1.1/24 28.1.1.2 tag 2")
step("Enable redistribute static in BGP with route-map")
@@ -1041,7 +1037,7 @@ def test_static_route_with_tag_p0_tc_13_ebgp(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 route-map on R2 with allow tag1 and deny tag2")
@@ -1229,7 +1225,7 @@ def test_static_route_with_tag_p0_tc_13_ebgp(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("shut/no shut of tag1 and tag2 nexthop")
diff --git a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py
index c1099bd97e..2efc0fdf1b 100644
--- a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py
+++ b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py
@@ -204,12 +204,12 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ebgp(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
)
@@ -256,7 +256,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ebgp(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
)
@@ -306,7 +306,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ebgp(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
)
@@ -409,7 +409,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ebgp(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": {
@@ -923,7 +923,7 @@ def test_static_routes_rmap_pfxlist_p0_tc7_ebgp(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
)
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
)