summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-10-14 01:48:41 +0300
committerGitHub <noreply@github.com>2021-10-14 01:48:41 +0300
commit1aa12de6956262a968ce4e792fb03a68a962a23c (patch)
treeec3cb952d5992a1e5873b9cf58db88e424162835
parente0a63f1703b843134725d2873af0528afc74b385 (diff)
parentc0fa628e995b1eac223ef936ba2d9427962586a9 (diff)
Merge pull request #9761 from mjstapp/fix_topo_debug_cli
tests: remove deprecated debug cli references
-rw-r--r--tests/topotests/all_protocol_startup/test_all_protocol_startup.py55
-rw-r--r--tests/topotests/ldp_topo1/test_ldp_topo1.py26
-rw-r--r--tests/topotests/rip_topo1/test_rip_topo1.py17
-rw-r--r--tests/topotests/ripng_topo1/test_ripng_topo1.py17
4 files changed, 15 insertions, 100 deletions
diff --git a/tests/topotests/all_protocol_startup/test_all_protocol_startup.py b/tests/topotests/all_protocol_startup/test_all_protocol_startup.py
index ddb7f4e16e..e8a793cfee 100644
--- a/tests/topotests/all_protocol_startup/test_all_protocol_startup.py
+++ b/tests/topotests/all_protocol_startup/test_all_protocol_startup.py
@@ -115,7 +115,7 @@ def setup_module(module):
tgen.gears["r%s" % i].start()
# For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
+ # tgen.mininet_cli()
def teardown_module(module):
@@ -127,7 +127,8 @@ def teardown_module(module):
def test_router_running():
global fatal_error
- net = get_topogen().net
+ tgen = get_topogen()
+ net = tgen.net
# Skip if previous fatal error condition is raised
if fatal_error != "":
@@ -143,7 +144,7 @@ def test_router_running():
assert fatal_error == "", fatal_error
# For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
+ # tgen.mininet_cli()
def test_error_messages_vtysh():
@@ -198,9 +199,6 @@ def test_error_messages_vtysh():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_error_messages_daemons():
global fatal_error
@@ -289,9 +287,6 @@ def test_error_messages_daemons():
assert error_logs == "", "Daemons report errors to StdErr"
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_converge_protocols():
global fatal_error
@@ -325,7 +320,7 @@ def test_converge_protocols():
actual = (
net["r%s" % i]
.cmd(
- "vtysh -c \"show ip route\" | sed -e '/^Codes: /,/^\s*$/d' | sort 2> /dev/null"
+ "vtysh -c \"show ip route\" | sed -e '/^Codes: /,/^\\s*$/d' | sort 2> /dev/null"
)
.rstrip()
)
@@ -358,7 +353,7 @@ def test_converge_protocols():
actual = (
net["r%s" % i]
.cmd(
- "vtysh -c \"show ipv6 route\" | sed -e '/^Codes: /,/^\s*$/d' | sort 2> /dev/null"
+ "vtysh -c \"show ipv6 route\" | sed -e '/^Codes: /,/^\\s*$/d' | sort 2> /dev/null"
)
.rstrip()
)
@@ -379,9 +374,6 @@ def test_converge_protocols():
assert failures == 0, "IPv6 Routing table failed for r%s\n%s" % (i, diff)
- # For debugging after starting FRR daemons, uncomment the next line
- ## CLI(net)
-
def route_get_nhg_id(route_str):
net = get_topogen().net
@@ -567,8 +559,6 @@ def test_nexthop_groups():
% nhg_id
)
- ##CLI(net)
-
## Remove all NHG routes
net["r1"].cmd('vtysh -c "sharp remove routes 2.2.2.1 1"')
@@ -638,9 +628,6 @@ def test_rip_status():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_ripng_status():
global fatal_error
@@ -705,9 +692,6 @@ def test_ripng_status():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_ospfv2_interfaces():
global fatal_error
@@ -790,9 +774,6 @@ def test_ospfv2_interfaces():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_isis_interfaces():
global fatal_error
@@ -856,9 +837,6 @@ def test_isis_interfaces():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_bgp_summary():
global fatal_error
@@ -1037,9 +1015,6 @@ def test_bgp_summary():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_bgp_ipv6_summary():
global fatal_error
@@ -1138,12 +1113,15 @@ def test_bgp_ipv6_summary():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_nht():
+ global fatal_error
net = get_topogen().net
+
+ # Skip if previous fatal error condition is raised
+ if fatal_error != "":
+ pytest.skip(fatal_error)
+
print("\n\n**** Test that nexthop tracking is at least nominally working ****\n")
thisDir = os.path.dirname(os.path.realpath(__file__))
@@ -1256,9 +1234,6 @@ def test_bgp_ipv4():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_bgp_ipv6():
global fatal_error
@@ -1325,9 +1300,6 @@ def test_bgp_ipv6():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_route_map():
global fatal_error
@@ -1567,9 +1539,6 @@ def test_mpls_interfaces():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_shutdown_check_stderr():
global fatal_error
diff --git a/tests/topotests/ldp_topo1/test_ldp_topo1.py b/tests/topotests/ldp_topo1/test_ldp_topo1.py
index c21d6bf28e..834205f653 100644
--- a/tests/topotests/ldp_topo1/test_ldp_topo1.py
+++ b/tests/topotests/ldp_topo1/test_ldp_topo1.py
@@ -126,7 +126,7 @@ def setup_module(module):
tgen.gears["r%s" % i].start()
# For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
+ # tgen.mininet_cli()
def teardown_module(module):
@@ -153,9 +153,6 @@ def test_router_running():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_mpls_interfaces():
global fatal_error
@@ -219,9 +216,6 @@ def test_mpls_interfaces():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_mpls_ldp_neighbor_establish():
global fatal_error
@@ -356,9 +350,6 @@ def test_mpls_ldp_discovery():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_mpls_ldp_neighbor():
global fatal_error
@@ -426,9 +417,6 @@ def test_mpls_ldp_neighbor():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_mpls_ldp_binding():
global fatal_error
@@ -518,9 +506,6 @@ def test_mpls_ldp_binding():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_zebra_ipv4_routingTable():
global fatal_error
@@ -595,9 +580,6 @@ def test_zebra_ipv4_routingTable():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_mpls_table():
global fatal_error
@@ -674,9 +656,6 @@ def test_mpls_table():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_linux_mpls_routes():
global fatal_error
@@ -758,9 +737,6 @@ def test_linux_mpls_routes():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_shutdown_check_stderr():
global fatal_error
diff --git a/tests/topotests/rip_topo1/test_rip_topo1.py b/tests/topotests/rip_topo1/test_rip_topo1.py
index c5812f28cf..7d59e8422f 100644
--- a/tests/topotests/rip_topo1/test_rip_topo1.py
+++ b/tests/topotests/rip_topo1/test_rip_topo1.py
@@ -108,7 +108,7 @@ def setup_module(module):
tgen.gears["r%s" % i].start()
# For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
+ # tgen.mininet_cli()
def teardown_module(module):
@@ -134,9 +134,6 @@ def test_router_running():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_converge_protocols():
global fatal_error
@@ -159,9 +156,6 @@ def test_converge_protocols():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_rip_status():
global fatal_error
@@ -220,9 +214,6 @@ def test_rip_status():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_rip_routes():
global fatal_error
@@ -275,9 +266,6 @@ def test_rip_routes():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_zebra_ipv4_routingTable():
global fatal_error
@@ -341,9 +329,6 @@ def test_zebra_ipv4_routingTable():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_shutdown_check_stderr():
global fatal_error
diff --git a/tests/topotests/ripng_topo1/test_ripng_topo1.py b/tests/topotests/ripng_topo1/test_ripng_topo1.py
index df81ac08c4..563c4f7497 100644
--- a/tests/topotests/ripng_topo1/test_ripng_topo1.py
+++ b/tests/topotests/ripng_topo1/test_ripng_topo1.py
@@ -104,7 +104,7 @@ def setup_module(module):
tgen.gears["r%s" % i].start()
# For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
+ # tgen.mininet_cli()
def teardown_module(module):
@@ -130,9 +130,6 @@ def test_router_running():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_converge_protocols():
global fatal_error
@@ -155,9 +152,6 @@ def test_converge_protocols():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_ripng_status():
global fatal_error
@@ -223,9 +217,6 @@ def test_ripng_status():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_ripng_routes():
global fatal_error
@@ -290,9 +281,6 @@ def test_ripng_routes():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_zebra_ipv6_routingTable():
global fatal_error
@@ -358,9 +346,6 @@ def test_zebra_ipv6_routingTable():
fatal_error = net["r%s" % i].checkRouterRunning()
assert fatal_error == "", fatal_error
- # For debugging after starting FRR daemons, uncomment the next line
- # CLI(net)
-
def test_shutdown_check_stderr():
global fatal_error