From 98ca91e18193a34791d4693c685b60d57ce56f35 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 8 Apr 2021 13:03:36 -0400 Subject: [PATCH] tests: Add some more pytest marks for bgpd Just another round of trying to add pytest.mark.bgpd. Not finished yet just what I could stand doing for a few minutes. Signed-off-by: Donald Sharp --- tests/topotests/bgp-ecmp-topo1/test_bgp_ecmp_topo1.py | 4 ++++ tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py | 4 ++++ tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py | 4 ++++ tests/topotests/bgp-evpn-mh/test_evpn_mh.py | 2 +- .../bgp_instance_del_test/test_bgp_instance_del_test.py | 3 +++ tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py | 3 +++ tests/topotests/bgp_lu_topo1/test_bgp_lu.py | 4 ++++ .../topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py | 4 ++++ tests/topotests/bgp_peer-group/test_bgp_peer-group.py | 3 +++ .../test_bgp_recursive_route_ebgp_multi_hop.py | 4 ++++ .../test_bgp_sender-as-path-loop-detection.py | 3 +++ .../multicast-pim-bsm-topo2/test_mcast_pim_bsmp_02.py | 4 ++++ 12 files changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/topotests/bgp-ecmp-topo1/test_bgp_ecmp_topo1.py b/tests/topotests/bgp-ecmp-topo1/test_bgp_ecmp_topo1.py index 400e7e9bf5..75506d1a51 100644 --- a/tests/topotests/bgp-ecmp-topo1/test_bgp_ecmp_topo1.py +++ b/tests/topotests/bgp-ecmp-topo1/test_bgp_ecmp_topo1.py @@ -45,6 +45,10 @@ from lib.topolog import logger # Required to instantiate the topology builder class. from mininet.topo import Topo + +pytestmark = [pytest.mark.bgpd] + + total_ebgp_peers = 20 ##################################################### diff --git a/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py b/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py index dfe6a8074d..fffcbbd0ef 100644 --- a/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py +++ b/tests/topotests/bgp-ecmp-topo2/test_ebgp_ecmp_topo2.py @@ -67,6 +67,10 @@ from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp from lib.topojson import build_topo_from_json, build_config_from_json + +pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] + + # Reading the data from JSON File for topology and configuration creation jsonFile = "{}/ebgp_ecmp_topo2.json".format(CWD) diff --git a/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py b/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py index 2bde52af1d..342a0a4b2f 100644 --- a/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py +++ b/tests/topotests/bgp-ecmp-topo2/test_ibgp_ecmp_topo2.py @@ -67,6 +67,10 @@ from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp from lib.topojson import build_topo_from_json, build_config_from_json + +pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] + + # Reading the data from JSON File for topology and configuration creation jsonFile = "{}/ibgp_ecmp_topo2.json".format(CWD) diff --git a/tests/topotests/bgp-evpn-mh/test_evpn_mh.py b/tests/topotests/bgp-evpn-mh/test_evpn_mh.py index 2744920272..f389632b1e 100644 --- a/tests/topotests/bgp-evpn-mh/test_evpn_mh.py +++ b/tests/topotests/bgp-evpn-mh/test_evpn_mh.py @@ -35,7 +35,7 @@ import json import platform from functools import partial -pytestmark = [pytest.mark.pimd] +pytestmark = [pytest.mark.bgpd, pytest.mark.pimd] # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py b/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py index 47cc0eb39d..0c7e84a5a3 100755 --- a/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py +++ b/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py @@ -30,6 +30,9 @@ sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../") from lib.ltemplate import * +pytestmark = [pytest.mark.bgpd, pytest.mark.ldpd, pytest.mark.ospfd] + + def test_check_linux_vrf(): CliOnFail = None # For debugging, uncomment the next line diff --git a/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py b/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py index 783e746418..cd845be296 100644 --- a/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py +++ b/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py @@ -46,6 +46,9 @@ from lib.topolog import logger from mininet.topo import Topo +pytestmark = [pytest.mark.bgpd] + + class BGPIPV6RTADVTopo(Topo): "Test topology builder" diff --git a/tests/topotests/bgp_lu_topo1/test_bgp_lu.py b/tests/topotests/bgp_lu_topo1/test_bgp_lu.py index d550c38a2f..d1745674f0 100644 --- a/tests/topotests/bgp_lu_topo1/test_bgp_lu.py +++ b/tests/topotests/bgp_lu_topo1/test_bgp_lu.py @@ -45,6 +45,10 @@ from lib.topolog import logger # Required to instantiate the topology builder class. from mininet.topo import Topo + +pytestmark = [pytest.mark.bgpd] + + # Basic scenario for BGP-LU. Nodes are directly connected. # Node 3 is advertising many routes to 2, which advertises them # as BGP-LU to 1; this way we get routes with actual labels, as diff --git a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py index 10cf1c6ae8..6d43cc0cd4 100644 --- a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py +++ b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py @@ -102,6 +102,10 @@ from lib.topolog import logger from lib.bgp import clear_bgp, verify_bgp_rib, create_router_bgp, verify_bgp_convergence from lib.topojson import build_config_from_json, build_topo_from_json + +pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] + + # Reading the data from JSON File for topology creation jsonFile = "{}/bgp_multi_vrf_topo2.json".format(CWD) diff --git a/tests/topotests/bgp_peer-group/test_bgp_peer-group.py b/tests/topotests/bgp_peer-group/test_bgp_peer-group.py index 7c7a8b87ed..21dc725793 100644 --- a/tests/topotests/bgp_peer-group/test_bgp_peer-group.py +++ b/tests/topotests/bgp_peer-group/test_bgp_peer-group.py @@ -39,6 +39,9 @@ from lib.topolog import logger from mininet.topo import Topo +pytestmark = [pytest.mark.bgpd] + + class TemplateTopo(Topo): def build(self, *_args, **_opts): tgen = get_topogen(self) diff --git a/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py b/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py index 4764ff8945..9b241bb5d1 100644 --- a/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py +++ b/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py @@ -86,6 +86,10 @@ from lib.bgp import ( ) from lib.topojson import build_topo_from_json, build_config_from_json + +pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] + + # Reading the data from JSON File for topology and configuration creation jsonFile = "{}/bgp_recursive_route_ebgp_multi_hop.json".format(CWD) try: diff --git a/tests/topotests/bgp_sender-as-path-loop-detection/test_bgp_sender-as-path-loop-detection.py b/tests/topotests/bgp_sender-as-path-loop-detection/test_bgp_sender-as-path-loop-detection.py index 88935ae4d1..dffe24f3a0 100644 --- a/tests/topotests/bgp_sender-as-path-loop-detection/test_bgp_sender-as-path-loop-detection.py +++ b/tests/topotests/bgp_sender-as-path-loop-detection/test_bgp_sender-as-path-loop-detection.py @@ -44,6 +44,9 @@ from lib.topolog import logger from mininet.topo import Topo +pytestmark = [pytest.mark.bgpd] + + class TemplateTopo(Topo): def build(self, *_args, **_opts): tgen = get_topogen(self) diff --git a/tests/topotests/multicast-pim-bsm-topo2/test_mcast_pim_bsmp_02.py b/tests/topotests/multicast-pim-bsm-topo2/test_mcast_pim_bsmp_02.py index 5fc5e52518..1a80c0d461 100644 --- a/tests/topotests/multicast-pim-bsm-topo2/test_mcast_pim_bsmp_02.py +++ b/tests/topotests/multicast-pim-bsm-topo2/test_mcast_pim_bsmp_02.py @@ -104,6 +104,10 @@ from lib.pim import ( from lib.topolog import logger from lib.topojson import build_topo_from_json, build_config_from_json + +pytestmark = [pytest.mark.pimd] + + # Reading the data from JSON File for topology creation jsonFile = "{}/mcast_pim_bsmp_02.json".format(CWD) try: -- 2.39.5