diff options
Diffstat (limited to 'tests/topotests/all_protocol_startup/test_all_protocol_startup.py')
| -rw-r--r-- | tests/topotests/all_protocol_startup/test_all_protocol_startup.py | 19 |
1 files changed, 6 insertions, 13 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 2d75428f1a..41597c449e 100644 --- a/tests/topotests/all_protocol_startup/test_all_protocol_startup.py +++ b/tests/topotests/all_protocol_startup/test_all_protocol_startup.py @@ -34,12 +34,7 @@ import pytest import glob from time import sleep -from mininet.topo import Topo -from mininet.net import Mininet -from mininet.node import Node, OVSSwitch, Host -from mininet.log import setLogLevel, info -from mininet.cli import CLI -from mininet.link import Intf +from lib.micronet_compat import Mininet, Topo from functools import partial @@ -82,7 +77,7 @@ class NetworkTopo(Topo): switch = {} # for i in range(0, 10): - switch[i] = self.addSwitch("sw%s" % i, cls=topotest.LegacySwitch) + switch[i] = self.addSwitch("sw%s" % i) self.addLink(switch[i], router[1], intfName2="r1-eth%s" % i) @@ -765,7 +760,7 @@ def test_ospfv2_interfaces(): ) # Mask out Bandwidth portion. They may change.. actual = re.sub(r"BW [0-9]+ Mbit", "BW XX Mbit", actual) - actual = re.sub(r"ifindex [0-9]", "ifindex X", actual) + actual = re.sub(r"ifindex [0-9]+", "ifindex X", actual) # Drop time in next due actual = re.sub(r"Hello due in [0-9\.]+s", "Hello due in XX.XXXs", actual) @@ -1155,7 +1150,7 @@ def test_nht(): expected = ("\n".join(expected.splitlines()) + "\n").splitlines(1) actual = net["r%s" % i].cmd('vtysh -c "show ip nht" 2> /dev/null').rstrip() - actual = re.sub(r"fd [0-9][0-9]", "fd XX", actual) + actual = re.sub(r"fd [0-9]+", "fd XX", actual) actual = ("\n".join(actual.splitlines()) + "\n").splitlines(1) diff = topotest.get_textdiff( @@ -1175,7 +1170,7 @@ def test_nht(): expected = ("\n".join(expected.splitlines()) + "\n").splitlines(1) actual = net["r%s" % i].cmd('vtysh -c "show ipv6 nht" 2> /dev/null').rstrip() - actual = re.sub(r"fd [0-9][0-9]", "fd XX", actual) + actual = re.sub(r"fd [0-9]+", "fd XX", actual) actual = ("\n".join(actual.splitlines()) + "\n").splitlines(1) diff = topotest.get_textdiff( @@ -1418,7 +1413,7 @@ def test_nexthop_groups_with_route_maps(): net["r1"].cmd('vtysh -c "sharp remove routes %s 1"' % route_str) net["r1"].cmd('vtysh -c "c t" -c "no ip protocol sharp route-map NH-SRC"') net["r1"].cmd( - 'vtysh -c "c t" -c "no route-map NH-SRC permit 111" -c "set src %s"' % src_str + 'vtysh -c "c t" -c "no route-map NH-SRC permit 111" # -c "set src %s"' % src_str ) net["r1"].cmd('vtysh -c "c t" -c "no route-map NH-SRC"') @@ -1659,8 +1654,6 @@ def test_shutdown_check_memleak(): if __name__ == "__main__": - - setLogLevel("info") # To suppress tracebacks, either use the following pytest call or add "--tb=no" to cli # retval = pytest.main(["-s", "--tb=no"]) retval = pytest.main(["-s"]) |
