]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Fixup to use the new `pytestmark =` syntax
authorDonald Sharp <sharpd@nvidia.com>
Sat, 23 Jan 2021 20:13:12 +0000 (15:13 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 4 Feb 2021 23:20:31 +0000 (18:20 -0500)
Go through all the current tests and convert over to correct syntax

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 files changed:
tests/topotests/all-protocol-startup/test_all_protocol_startup.py
tests/topotests/bfd-bgp-cbit-topo3/test_bfd_bgp_cbit_topo3.py
tests/topotests/bfd-isis-topo1/test_bfd_isis_topo1.py
tests/topotests/bfd-profiles-topo1/test_bfd_profiles_topo1.py
tests/topotests/bfd-topo1/test_bfd_topo1.py
tests/topotests/bfd-topo2/test_bfd_topo2.py
tests/topotests/bfd-vrf-topo1/test_bfd_vrf_topo1.py
tests/topotests/bgp-evpn-mh/test_evpn_mh.py
tests/topotests/eigrp-topo1/test_eigrp_topo1.py
tests/topotests/evpn-pim-1/test_evpn_pim_topo1.py
tests/topotests/isis-lfa-topo1/test_isis_lfa_topo1.py
tests/topotests/isis-rlfa-topo1/test_isis_rlfa_topo1.py
tests/topotests/isis-sr-te-topo1/test_isis_sr_te_topo1.py
tests/topotests/isis-sr-topo1/test_isis_sr_topo1.py
tests/topotests/isis-tilfa-topo1/test_isis_tilfa_topo1.py
tests/topotests/isis-topo1-vrf/test_isis_topo1_vrf.py
tests/topotests/isis-topo1/test_isis_topo1.py
tests/topotests/ldp-topo1/test_ldp_topo1.py
tests/topotests/ldp-vpls-topo1/test_ldp_vpls_topo1.py
tests/topotests/pbr-topo1/test_pbr_topo1.py
tests/topotests/pim-basic/test_pim.py
tests/topotests/rip-topo1/test_rip_topo1.py
tests/topotests/ripng-topo1/test_ripng_topo1.py

index 5942aca71d787a1d1f03b96efcf9c20fe8561bea..ce5f1158accb01b5882efe120ac89f27b9d4e717 100644 (file)
@@ -43,6 +43,8 @@ from mininet.link import Intf
 
 from functools import partial
 
+pytestmark = [pytest.mark.isisd, pytest.mark.ospfd, pytest.mark.ripd]
+
 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 from lib import topotest
 
@@ -83,9 +85,6 @@ class NetworkTopo(Topo):
 #####################################################
 
 
-@pytest.mark.isis
-@pytest.mark.ospf
-@pytest.mark.rip
 def setup_module(module):
     global topo, net
     global fatal_error
index cc1c1e3a0cd6dd853984efd54219880bdbd2ff00..4c3bad128013010a35e219100df8963de2b042e3 100644 (file)
@@ -44,6 +44,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bfdd]
 
 class BFDTopo(Topo):
     "Test topology builder"
@@ -64,7 +65,6 @@ class BFDTopo(Topo):
         switch.add_link(tgen.gears["r2"])
         switch.add_link(tgen.gears["r3"])
 
-@pytest.mark.bfd
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(BFDTopo, mod.__name__)
index 23da7ed850766dbae7fef0af4940bf3f3aa076f6..bb930141ac4a5fc928458a800be76b2aeaa19cc4 100644 (file)
@@ -90,6 +90,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bfdd, pytest.mark.isisd]
 
 class TemplateTopo(Topo):
     "Test topology builder"
@@ -127,8 +128,7 @@ class TemplateTopo(Topo):
         switch.add_link(tgen.gears["rt4"], nodeif="eth-rt5")
         switch.add_link(tgen.gears["rt5"], nodeif="eth-rt4")
 
-@pytest.mark.bfd
-@pytest.mark.isis
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(TemplateTopo, mod.__name__)
index 6283f03ddf0d4cc05a46508cf9b217a63e966dca..74e3fd9ce0f93ff0e47a8cd6c6d024b81c42dcd7 100644 (file)
@@ -45,6 +45,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bfdd, pytest.mark.isisd]
 
 class BFDProfTopo(Topo):
     "Test topology builder"
@@ -77,8 +78,7 @@ class BFDProfTopo(Topo):
         switch.add_link(tgen.gears["r1"])
         switch.add_link(tgen.gears["r6"])
 
-@pytest.mark.bfd
-@pytest.mark.isis
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(BFDProfTopo, mod.__name__)
index 4c13fdcfc5fa7d1eb82bed344765f4104542ee55..76078b5d7d35ba2a1740c19e8380778418e04f1d 100644 (file)
@@ -45,6 +45,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bfdd]
 
 class BFDTopo(Topo):
     "Test topology builder"
@@ -69,7 +70,7 @@ class BFDTopo(Topo):
         switch.add_link(tgen.gears["r2"])
         switch.add_link(tgen.gears["r4"])
 
-@pytest.mark.bfd
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(BFDTopo, mod.__name__)
index 5181a40f477754ceb196b67530bac857316808dd..0d7e71974f8832bfa517c4c870c87e4a6237e496 100644 (file)
@@ -46,6 +46,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bfdd]
 
 class BFDTopo(Topo):
     "Test topology builder"
@@ -70,7 +71,7 @@ class BFDTopo(Topo):
         switch.add_link(tgen.gears["r2"])
         switch.add_link(tgen.gears["r4"])
 
-@pytest.mark.bfd
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(BFDTopo, mod.__name__)
index 956b52658309f61501339ba77657b1818305fb75..a238ff8da3d36922a33ba46db04293c709619c7b 100644 (file)
@@ -46,6 +46,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bfdd]
 
 class BFDTopo(Topo):
     "Test topology builder"
@@ -70,7 +71,7 @@ class BFDTopo(Topo):
         switch.add_link(tgen.gears["r2"])
         switch.add_link(tgen.gears["r4"])
 
-@pytest.mark.bfd
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(BFDTopo, mod.__name__)
index 61be947a717ed81b4250e693a8da4146fc1459d4..aec78179ff8977c6ada2f2eb35d080693ae3e413 100644 (file)
@@ -35,7 +35,7 @@ import json
 import platform
 from functools import partial
 
-pytestmark = pytest.mark.pimd
+pytestmark = [pytest.mark.pimd]
 
 # Save the Current Working Directory to find configuration files.
 CWD = os.path.dirname(os.path.realpath(__file__))
index bf94d39a4b570a3ee195d2945746bd4c637dc2c3..6993bc53e706fe545834e6ceecc48d007f874b97 100644 (file)
@@ -33,6 +33,8 @@ import sys
 import pytest
 import json
 
+pytestmark = [pytest.mark.eigrpd]
+
 # Save the Current Working Directory to find configuration files.
 CWD = os.path.dirname(os.path.realpath(__file__))
 sys.path.append(os.path.join(CWD, "../"))
@@ -91,7 +93,7 @@ class NetworkTopo(Topo):
 ##
 #####################################################
 
-@pytest.mark.eigrp
+
 def setup_module(module):
     "Setup topology"
     tgen = Topogen(NetworkTopo, module.__name__)
index d8c0cdc2fd1615ebc97325977ba0565e0c44bb1c..260a197acae776aebbf1f4f9a29d6cbd77c94e36 100644 (file)
@@ -34,7 +34,7 @@ import pytest
 import json
 from functools import partial
 
-pytestmark = pytest.mark.pimd
+pytestmark = [pytest.mark.pimd]
 
 # Save the Current Working Directory to find configuration files.
 CWD = os.path.dirname(os.path.realpath(__file__))
index a655b418cf2fe91058127beef023a1bc25b6a6b1..ab15c3542f61c4b7e9e42eef4a574707485038e0 100755 (executable)
@@ -73,6 +73,8 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd]
+
 # Global multi-dimensional dictionary containing all expected outputs
 outputs = {}
 
@@ -163,7 +165,6 @@ class TemplateTopo(Topo):
                         f_in.close()
                         f_out.close()
 
-@pytest.mark.isis
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(TemplateTopo, mod.__name__)
index bb43e6b114373af3538a08560aa7e2561fe01260..4c692841ac5d81bc9e9d9712715cf40c963811df 100755 (executable)
@@ -82,6 +82,8 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd]
+
 # Global multi-dimensional dictionary containing all expected outputs
 outputs = {}
 
@@ -165,7 +167,6 @@ class TemplateTopo(Topo):
                         f_in.close()
                         f_out.close()
 
-@pytest.mark.isis
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(TemplateTopo, mod.__name__)
index bfd2f92a28b015d92c5ac7b9918c9fb11bb29d36..d7c95f28b84a0beb02089afb531920e52d9a3ea0 100755 (executable)
@@ -96,6 +96,8 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd]
+
 class TemplateTopo(Topo):
     "Test topology builder"
     def build(self, *_args, **_opts):
@@ -148,7 +150,6 @@ class TemplateTopo(Topo):
         switch.add_link(tgen.gears['rt6'], nodeif="eth-dst")
         switch.add_link(tgen.gears['dst'], nodeif="eth-rt6")
 
-@pytest.mark.isis
 def setup_module(mod):
     "Sets up the pytest environment"
 
index 63be3f78aa9fd818594d98faae7f6d0172160a2d..8a7d6ee88255095e719b64f47e1b3651cb8e7578 100644 (file)
@@ -84,6 +84,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd]
 
 class TemplateTopo(Topo):
     "Test topology builder"
@@ -134,7 +135,7 @@ class TemplateTopo(Topo):
         switch.add_link(tgen.gears["rt5"], nodeif="eth-rt6")
         switch.add_link(tgen.gears["rt6"], nodeif="eth-rt5")
 
-@pytest.mark.isis
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(TemplateTopo, mod.__name__)
index 83751fabcd5103ca15c6a5f27c450b0c203a8945..39b3299603d1949a7946a675a1965ce6154b8257 100755 (executable)
@@ -85,6 +85,8 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd]
+
 # Global multi-dimensional dictionary containing all expected outputs
 outputs = {}
 
@@ -177,7 +179,6 @@ class TemplateTopo(Topo):
                         f_in.close()
                         f_out.close()
 
-@pytest.mark.isis
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(TemplateTopo, mod.__name__)
index a79c8a268b1e1872754a2e8b253ca572746e7394..7bc694cbb016c82a2ea4dd17279540f24f6298f4 100644 (file)
@@ -43,6 +43,7 @@ from lib.topolog import logger
 
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd]
 
 class ISISTopo1(Topo):
     "Simple two layer ISIS vrf topology"
@@ -82,7 +83,7 @@ class ISISTopo1(Topo):
         sw.add_link(tgen.gears["r4"])
         sw.add_link(tgen.gears["r5"])
 
-@pytest.mark.isis
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(ISISTopo1, mod.__name__)
index 25116d94522569499d5f811e0fa57ad6efe5005d..696342928845c893bd5177087c5d67a70935f26e 100644 (file)
@@ -45,6 +45,7 @@ from lib.topolog import logger
 
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd]
 
 class ISISTopo1(Topo):
     "Simple two layer ISIS topology"
@@ -84,7 +85,7 @@ class ISISTopo1(Topo):
         sw.add_link(tgen.gears["r4"])
         sw.add_link(tgen.gears["r5"])
 
-@pytest.mark.isis
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(ISISTopo1, mod.__name__)
index dfe65f010e5e2f8f8a88bd09226da561ffe4a342..d9e23e9ea9ef4e57f25b3fb81310f8d07d54f394 100644 (file)
@@ -77,6 +77,8 @@ from lib import topotest
 
 fatal_error = ""
 
+pytestmark = [pytest.mark.ldpd]
+
 #####################################################
 ##
 ##   Network Topology Definition
@@ -159,7 +161,7 @@ class NetworkTopo(Topo):
 ##
 #####################################################
 
-@pytest.mark.ldp
+
 def setup_module(module):
     global topo, net
     global fatal_error
index d659acb470866421f8c762eaf79aec492f144646..fe57f3707af732d523c0df7c6cb789dfc8c06914 100644 (file)
@@ -80,6 +80,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.ldpd, pytest.mark.ospfd]
 
 class TemplateTopo(Topo):
     "Test topology builder"
@@ -121,8 +122,7 @@ class TemplateTopo(Topo):
         switch.add_link(tgen.gears["r2"])
         switch.add_link(tgen.gears["r3"])
 
-@pytest.mark.ldp
-@pytest.mark.ospf
+
 def setup_module(mod):
     "Sets up the pytest environment"
     tgen = Topogen(TemplateTopo, mod.__name__)
index 5161d5eec75456acbe99ff9c2a27575149b232f3..4b6de51c86336fc0342c170996ea565bff0bc0a8 100644 (file)
@@ -49,6 +49,8 @@ from lib.common_config import shutdown_bringup_interface
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.pbrd]
+
 #####################################################
 ##
 ##   Network Topology Definition
@@ -80,7 +82,6 @@ class NetworkTopo(Topo):
 ##
 #####################################################
 
-@pytest.mark.pbr
 def setup_module(module):
     "Setup topology"
     tgen = Topogen(NetworkTopo, module.__name__)
index 224b82f1fb0242808d83caf4a32eae1832c62ad7..918d3847cebdaa6a5a4200425592dbc0b02cae4b 100644 (file)
@@ -43,6 +43,7 @@ from lib.topolog import logger
 
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.pimd]
 
 class PIMTopo(Topo):
     def build(self, *_args, **_opts):
index edad1ff65d0e7854ef1622f727048d592614f3c1..78672ac8713ba726b378f02129beea43960f8d42 100644 (file)
@@ -47,6 +47,7 @@ from lib import topotest
 
 fatal_error = ""
 
+pytestmark = [pytest.mark.ripd]
 
 #####################################################
 ##
@@ -104,7 +105,7 @@ class NetworkTopo(Topo):
 ##
 #####################################################
 
-@pytest.mark.rip
+
 def setup_module(module):
     global topo, net
 
index 47b63e5b264b4469ebad8655769e235b0e1188d7..4a5a59cd75a233a28a7d7c7df62d4b285edb94d3 100644 (file)
@@ -48,6 +48,7 @@ from lib import topotest
 
 fatal_error = ""
 
+pytestmark = [pytest.mark.ripd]
 
 #####################################################
 ##
@@ -104,7 +105,7 @@ class NetworkTopo(Topo):
 ##
 #####################################################
 
-@pytest.mark.rip
+
 def setup_module(module):
     global topo, net