]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: pytest markers in topotest templates
authorDavid Schweizer <dschweizer@opensourcerouting.org>
Thu, 21 Jan 2021 16:06:58 +0000 (17:06 +0100)
committerDavid Schweizer <dschweizer@opensourcerouting.org>
Thu, 21 Jan 2021 16:06:58 +0000 (17:06 +0100)
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
tests/topotests/example-test/test_template.py
tests/topotests/example-topojson-test/test_topo_json_multiple_links/test_example_topojson_multiple_links.py
tests/topotests/example-topojson-test/test_topo_json_single_link/test_example_topojson.py
tests/topotests/example-topojson-test/test_topo_json_single_link_loopback/test_example_topojson.py

index 4305e0199ff72361645b17044fc1a7f61835e0b7..973303b83099a4e88e518d84e6bee80e4f5d7386 100644 (file)
@@ -44,6 +44,18 @@ from lib.topolog import logger
 from mininet.topo import Topo
 
 
+#TODO: select markers based on daemons used during test
+# pytest module level markers
+"""
+pytestmark = pytest.mark.bfdd # single marker
+pytestmark = [
+       pytest.mark.bgpd,
+       pytest.mark.ospfd,
+       pytest.mark.ospf6d
+] # multiple markers
+"""
+
+
 class TemplateTopo(Topo):
     "Test topology builder"
 
index f24f463b8abdced8831fa8d32d6ee68ea001e3d7..cd48716905728928c0febac25b004f5779fb78fa 100755 (executable)
@@ -53,6 +53,19 @@ from lib.topolog import logger
 from lib.bgp import verify_bgp_convergence
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+
+#TODO: select markers based on daemons used during test
+# pytest module level markers
+"""
+pytestmark = pytest.mark.bfdd # single marker
+pytestmark = [
+       pytest.mark.bgpd,
+       pytest.mark.ospfd,
+       pytest.mark.ospf6d
+] # multiple markers
+"""
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/example_topojson_multiple_links.json".format(CWD)
 try:
index 3ae3c9f4fed1b630c28934e69a94842ea65fc6c8..0c72e3004479f2af04270dab4a3d2671a4f0ca71 100755 (executable)
@@ -52,6 +52,19 @@ from lib.topolog import logger
 from lib.bgp import verify_bgp_convergence
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+
+#TODO: select markers based on daemons used during test
+# pytest module level markers
+"""
+pytestmark = pytest.mark.bfdd # single marker
+pytestmark = [
+       pytest.mark.bgpd,
+       pytest.mark.ospfd,
+       pytest.mark.ospf6d
+] # multiple markers
+"""
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/example_topojson.json".format(CWD)
 
index 06fa2f4626952a51311c779ee363e50bae58333b..d05ad6db21f40c277a16baec1ca6f64e0f808c16 100755 (executable)
@@ -54,6 +54,19 @@ from lib.topolog import logger
 from lib.bgp import verify_bgp_convergence
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+
+#TODO: select markers based on daemons used during test
+# pytest module level markers
+"""
+pytestmark = pytest.mark.bfdd # single marker
+pytestmark = [
+       pytest.mark.bgpd,
+       pytest.mark.ospfd,
+       pytest.mark.ospf6d
+] # multiple markers
+"""
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/example_topojson.json".format(CWD)