diff options
| author | Christian Hopps <chopps@labn.net> | 2021-08-27 14:28:29 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2021-09-04 09:04:46 -0400 |
| commit | 8db751b853560377ebd640c729ecb4e155e6a6d7 (patch) | |
| tree | 51a8419faf7cc64401f05b13c95a30895c5cd2f9 /tests/topotests/bfd_bgp_cbit_topo3 | |
| parent | 4958158787ce9179020d024c14416a23e82713b1 (diff) | |
tests: micronet: adapt tests
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'tests/topotests/bfd_bgp_cbit_topo3')
| -rw-r--r-- | tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py b/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py index 560d6eebec..29c25bba29 100644 --- a/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py +++ b/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py @@ -41,35 +41,17 @@ from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -# Required to instantiate the topology builder class. -from mininet.topo import Topo - pytestmark = [pytest.mark.bgpd, pytest.mark.bfdd] -class BFDTopo(Topo): - "Test topology builder" - - def build(self, *_args, **_opts): - "Build function" - tgen = get_topogen(self) - - # Create 4 routers. - for routern in range(1, 4): - tgen.add_router("r{}".format(routern)) - - switch = tgen.add_switch("s1") - switch.add_link(tgen.gears["r1"]) - switch.add_link(tgen.gears["r2"]) - - switch = tgen.add_switch("s2") - switch.add_link(tgen.gears["r2"]) - switch.add_link(tgen.gears["r3"]) - - def setup_module(mod): "Sets up the pytest environment" - tgen = Topogen(BFDTopo, mod.__name__) + from collections import OrderedDict + topodef = { + "s1": ("r1", "r2"), + "s2": ("r2", "r3"), + } + tgen = Topogen(topodef, mod.__name__) tgen.start_topology() router_list = tgen.routers() |
