tests: pytest markers in topotest templates

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
This commit is contained in:
David Schweizer 2021-01-21 17:06:58 +01:00
parent 309638adb5
commit 6bd548aa49
No known key found for this signature in database
GPG Key ID: A07D97BEEE79EF7F
4 changed files with 51 additions and 0 deletions

View 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"

View File

@ -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:

View File

@ -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)

View File

@ -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)