diff --git a/.azure-pipelines/pytest-collect-only.yml b/.azure-pipelines/pytest-collect-only.yml index 93057efdb91..6d1d2bca9e0 100644 --- a/.azure-pipelines/pytest-collect-only.yml +++ b/.azure-pipelines/pytest-collect-only.yml @@ -35,7 +35,7 @@ steps: set -x sudo docker exec -t -w /var/src/sonic-mgmt/tests sonic-mgmt-collect \ - pytest --inventory ../ansible/veos_vtb --host-pattern all \ + python3 -m pytest --inventory ../ansible/veos_vtb --host-pattern all \ --testbed_file vtestbed.yaml --testbed vms-kvm-t0 \ --ignore saitests --ignore ptftests --ignore acstests \ --ignore scripts --ignore k8s --ignore sai_qualify --ignore common \ diff --git a/tests/snappi_tests/bgp/test_bgp_convergence_performance.py b/tests/snappi_tests/bgp/test_bgp_convergence_performance.py index 45502f6831d..fa7ecdde38f 100644 --- a/tests/snappi_tests/bgp/test_bgp_convergence_performance.py +++ b/tests/snappi_tests/bgp/test_bgp_convergence_performance.py @@ -1,6 +1,6 @@ from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 cvg_api, snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.bgp_test_gap_helper import run_bgp_convergence_performance +from tests.snappi_tests.bgp.files.bgp_test_gap_helper import run_bgp_convergence_performance from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/bgp/test_bgp_local_link_failover.py b/tests/snappi_tests/bgp/test_bgp_local_link_failover.py index 354d277da9f..02cd88ede7e 100644 --- a/tests/snappi_tests/bgp/test_bgp_local_link_failover.py +++ b/tests/snappi_tests/bgp/test_bgp_local_link_failover.py @@ -1,6 +1,6 @@ from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 cvg_api, snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.bgp_convergence_helper import run_bgp_local_link_failover_test +from tests.snappi_tests.bgp.files.bgp_convergence_helper import run_bgp_local_link_failover_test from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/bgp/test_bgp_remote_link_failover.py b/tests/snappi_tests/bgp/test_bgp_remote_link_failover.py index afc53dc5645..215021647c3 100755 --- a/tests/snappi_tests/bgp/test_bgp_remote_link_failover.py +++ b/tests/snappi_tests/bgp/test_bgp_remote_link_failover.py @@ -1,6 +1,6 @@ from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 cvg_api, snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.bgp_convergence_helper import run_bgp_remote_link_failover_test +from tests.snappi_tests.bgp.files.bgp_convergence_helper import run_bgp_remote_link_failover_test from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/bgp/test_bgp_rib_in_capacity.py b/tests/snappi_tests/bgp/test_bgp_rib_in_capacity.py index e2c64acbbf1..f58686f5772 100644 --- a/tests/snappi_tests/bgp/test_bgp_rib_in_capacity.py +++ b/tests/snappi_tests/bgp/test_bgp_rib_in_capacity.py @@ -1,6 +1,6 @@ from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 cvg_api, snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.bgp_convergence_helper import run_RIB_IN_capacity_test +from tests.snappi_tests.bgp.files.bgp_convergence_helper import run_RIB_IN_capacity_test from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/bgp/test_bgp_rib_in_convergence.py b/tests/snappi_tests/bgp/test_bgp_rib_in_convergence.py index 30f19cb72a4..afed29098b3 100644 --- a/tests/snappi_tests/bgp/test_bgp_rib_in_convergence.py +++ b/tests/snappi_tests/bgp/test_bgp_rib_in_convergence.py @@ -1,6 +1,6 @@ from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 cvg_api, snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.bgp_convergence_helper import run_rib_in_convergence_test +from tests.snappi_tests.bgp.files.bgp_convergence_helper import run_rib_in_convergence_test from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/bgp/test_bgp_scalability.py b/tests/snappi_tests/bgp/test_bgp_scalability.py index 08c672ccb67..e95847d5897 100644 --- a/tests/snappi_tests/bgp/test_bgp_scalability.py +++ b/tests/snappi_tests/bgp/test_bgp_scalability.py @@ -1,6 +1,7 @@ from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 cvg_api, snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.bgp_test_gap_helper import duthost_bgp_scalability_config, run_bgp_scalability_v4_v6, cleanup_config +from tests.snappi_tests.bgp.files.bgp_test_gap_helper import duthost_bgp_scalability_config, \ + run_bgp_scalability_v4_v6, cleanup_config from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/ecn/conftest.py b/tests/snappi_tests/ecn/conftest.py index 9d0187b6832..89a4b1a74d1 100644 --- a/tests/snappi_tests/ecn/conftest.py +++ b/tests/snappi_tests/ecn/conftest.py @@ -1,4 +1,4 @@ -from ecn_args.ecn_args import add_ecn_args +from tests.snappi_tests.ecn.ecn_args.ecn_args import add_ecn_args def pytest_addoption(parser): diff --git a/tests/snappi_tests/ecn/test_dequeue_ecn_with_snappi.py b/tests/snappi_tests/ecn/test_dequeue_ecn_with_snappi.py index 2eb96f2da89..1048a0eaccf 100644 --- a/tests/snappi_tests/ecn/test_dequeue_ecn_with_snappi.py +++ b/tests/snappi_tests/ecn/test_dequeue_ecn_with_snappi.py @@ -7,7 +7,7 @@ snappi_api, snappi_testbed_config # noqa F401 from tests.common.snappi_tests.qos_fixtures import prio_dscp_map, lossless_prio_list # noqa F401 -from files.helper import run_ecn_test, is_ecn_marked +from tests.snappi_tests.ecn.files.helper import run_ecn_test, is_ecn_marked pytestmark = [pytest.mark.topology('tgen')] diff --git a/tests/snappi_tests/ecn/test_red_accuracy_with_snappi.py b/tests/snappi_tests/ecn/test_red_accuracy_with_snappi.py index 7a33ab26bf1..3a23ef739c0 100644 --- a/tests/snappi_tests/ecn/test_red_accuracy_with_snappi.py +++ b/tests/snappi_tests/ecn/test_red_accuracy_with_snappi.py @@ -8,7 +8,7 @@ snappi_api, snappi_testbed_config # noqa F401 from tests.common.snappi_tests.qos_fixtures import prio_dscp_map, lossless_prio_list # noqa F401 -from files.helper import run_ecn_test, is_ecn_marked +from tests.snappi_tests.ecn.files.helper import run_ecn_test, is_ecn_marked pytestmark = [pytest.mark.topology('tgen')] diff --git a/tests/snappi_tests/lacp/test_add_remove_link_from_dut.py b/tests/snappi_tests/lacp/test_add_remove_link_from_dut.py index fdb2869379b..de0675469fe 100755 --- a/tests/snappi_tests/lacp/test_add_remove_link_from_dut.py +++ b/tests/snappi_tests/lacp/test_add_remove_link_from_dut.py @@ -1,7 +1,7 @@ from tests.common.snappi_tests.snappi_fixtures import cvg_api, snappi_api # noqa F401 from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.lacp_dut_helper import run_lacp_add_remove_link_from_dut +from tests.snappi_tests.lacp.files.lacp_dut_helper import run_lacp_add_remove_link_from_dut from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/lacp/test_add_remove_link_physically.py b/tests/snappi_tests/lacp/test_add_remove_link_physically.py index e4084a20510..0683f791498 100755 --- a/tests/snappi_tests/lacp/test_add_remove_link_physically.py +++ b/tests/snappi_tests/lacp/test_add_remove_link_physically.py @@ -1,7 +1,7 @@ from tests.common.snappi_tests.snappi_fixtures import cvg_api # noqa F401 from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.lacp_physical_helper import run_lacp_add_remove_link_physically +from tests.snappi_tests.lacp.files.lacp_physical_helper import run_lacp_add_remove_link_physically from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/lacp/test_lacp_timers_effect.py b/tests/snappi_tests/lacp/test_lacp_timers_effect.py index 8e48346d75c..8acc81543a7 100644 --- a/tests/snappi_tests/lacp/test_lacp_timers_effect.py +++ b/tests/snappi_tests/lacp/test_lacp_timers_effect.py @@ -1,7 +1,7 @@ from tests.common.snappi_tests.snappi_fixtures import cvg_api # noqa F401 from tests.common.snappi_tests.snappi_fixtures import ( # noqa F401 snappi_api_serv_ip, snappi_api_serv_port, tgen_ports) -from .files.lacp_physical_helper import run_lacp_timers_effect +from tests.snappi_tests.lacp.files.lacp_physical_helper import run_lacp_timers_effect from tests.common.fixtures.conn_graph_facts import ( # noqa F401 conn_graph_facts, fanout_graph_facts) import pytest diff --git a/tests/snappi_tests/pfc/test_global_pause_with_snappi.py b/tests/snappi_tests/pfc/test_global_pause_with_snappi.py index 845e057a29d..1ebdbfb6913 100644 --- a/tests/snappi_tests/pfc/test_global_pause_with_snappi.py +++ b/tests/snappi_tests/pfc/test_global_pause_with_snappi.py @@ -8,7 +8,7 @@ from tests.common.snappi_tests.qos_fixtures import prio_dscp_map, all_prio_list, lossless_prio_list,\ lossy_prio_list # noqa F401 -from .files.helper import run_pfc_test +from tests.snappi_tests.pfc.files.helper import run_pfc_test pytestmark = [pytest.mark.topology('tgen')] diff --git a/tests/snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py b/tests/snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py index 92b6835c5bd..a3ac7e16bb7 100644 --- a/tests/snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py +++ b/tests/snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py @@ -1,7 +1,7 @@ import logging import pytest -from .files.helper import run_pfc_test +from tests.snappi_tests.pfc.files.helper import run_pfc_test from tests.common.helpers.assertions import pytest_assert, pytest_require from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\ fanout_graph_facts # noqa F401 diff --git a/tests/snappi_tests/pfc/test_pfc_pause_lossy_with_snappi.py b/tests/snappi_tests/pfc/test_pfc_pause_lossy_with_snappi.py index fd13ebad03d..4ec5c68d0f2 100644 --- a/tests/snappi_tests/pfc/test_pfc_pause_lossy_with_snappi.py +++ b/tests/snappi_tests/pfc/test_pfc_pause_lossy_with_snappi.py @@ -1,7 +1,7 @@ import logging import pytest -from .files.helper import run_pfc_test +from tests.snappi_tests.pfc.files.helper import run_pfc_test from tests.common.helpers.assertions import pytest_assert, pytest_require from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\ fanout_graph_facts # noqa F401 diff --git a/tests/snappi_tests/pfc/test_pfc_pause_response_with_snappi.py b/tests/snappi_tests/pfc/test_pfc_pause_response_with_snappi.py index 3598db47761..36b5c540cbf 100644 --- a/tests/snappi_tests/pfc/test_pfc_pause_response_with_snappi.py +++ b/tests/snappi_tests/pfc/test_pfc_pause_response_with_snappi.py @@ -1,7 +1,7 @@ import logging import pytest -from .files.helper import run_pfc_test +from tests.snappi_tests.pfc.files.helper import run_pfc_test from tests.common.helpers.assertions import pytest_require from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\ fanout_graph_facts # noqa F401 diff --git a/tests/snappi_tests/pfc/test_pfc_pause_unset_bit_enable_vector.py b/tests/snappi_tests/pfc/test_pfc_pause_unset_bit_enable_vector.py index 869f9d88de8..554e84a9800 100644 --- a/tests/snappi_tests/pfc/test_pfc_pause_unset_bit_enable_vector.py +++ b/tests/snappi_tests/pfc/test_pfc_pause_unset_bit_enable_vector.py @@ -1,7 +1,7 @@ import logging import pytest -from files.helper import run_pfc_test +from tests.snappi_tests.pfc.files.helper import run_pfc_test from tests.common.helpers.assertions import pytest_require from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\ fanout_graph_facts # noqa F401 diff --git a/tests/snappi_tests/pfc/test_pfc_pause_zero_mac.py b/tests/snappi_tests/pfc/test_pfc_pause_zero_mac.py index 2bb73a28f68..66573b9a88f 100644 --- a/tests/snappi_tests/pfc/test_pfc_pause_zero_mac.py +++ b/tests/snappi_tests/pfc/test_pfc_pause_zero_mac.py @@ -1,7 +1,7 @@ import logging import pytest -from files.helper import run_pfc_test +from tests.snappi_tests.pfc.files.helper import run_pfc_test from tests.common.helpers.assertions import pytest_require from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\ fanout_graph_facts # noqa F401 diff --git a/tests/snappi_tests/pfcwd/test_pfcwd_a2a_with_snappi.py b/tests/snappi_tests/pfcwd/test_pfcwd_a2a_with_snappi.py index 3893926783b..07b65529d0f 100644 --- a/tests/snappi_tests/pfcwd/test_pfcwd_a2a_with_snappi.py +++ b/tests/snappi_tests/pfcwd/test_pfcwd_a2a_with_snappi.py @@ -8,7 +8,7 @@ from tests.common.snappi_tests.qos_fixtures import prio_dscp_map, all_prio_list,\ lossless_prio_list, lossy_prio_list # noqa F401 -from .files.pfcwd_multi_node_helper import run_pfcwd_multi_node_test +from tests.snappi_tests.pfcwd.files.pfcwd_multi_node_helper import run_pfcwd_multi_node_test pytestmark = [pytest.mark.topology('tgen')] diff --git a/tests/snappi_tests/pfcwd/test_pfcwd_basic_with_snappi.py b/tests/snappi_tests/pfcwd/test_pfcwd_basic_with_snappi.py index 4fbdb70b708..6bf09800778 100644 --- a/tests/snappi_tests/pfcwd/test_pfcwd_basic_with_snappi.py +++ b/tests/snappi_tests/pfcwd/test_pfcwd_basic_with_snappi.py @@ -10,7 +10,7 @@ from tests.common.config_reload import config_reload from tests.common.reboot import reboot from tests.common.utilities import wait_until -from .files.pfcwd_basic_helper import run_pfcwd_basic_test +from tests.snappi_tests.pfcwd.files.pfcwd_basic_helper import run_pfcwd_basic_test from tests.snappi_tests.files.helper import skip_warm_reboot logger = logging.getLogger(__name__) diff --git a/tests/snappi_tests/pfcwd/test_pfcwd_burst_storm_with_snappi.py b/tests/snappi_tests/pfcwd/test_pfcwd_burst_storm_with_snappi.py index dfc31af5231..c065a9e51bd 100644 --- a/tests/snappi_tests/pfcwd/test_pfcwd_burst_storm_with_snappi.py +++ b/tests/snappi_tests/pfcwd/test_pfcwd_burst_storm_with_snappi.py @@ -7,7 +7,7 @@ from tests.common.snappi_tests.snappi_fixtures import snappi_api_serv_ip, snappi_api_serv_port,\ snappi_api, snappi_testbed_config # noqa F401 from tests.common.snappi_tests.qos_fixtures import prio_dscp_map # noqa F401 -from .files.pfcwd_burst_storm_helper import run_pfcwd_burst_storm_test +from tests.snappi_tests.pfcwd.files.pfcwd_burst_storm_helper import run_pfcwd_burst_storm_test logger = logging.getLogger(__name__) diff --git a/tests/snappi_tests/pfcwd/test_pfcwd_m2o_with_snappi.py b/tests/snappi_tests/pfcwd/test_pfcwd_m2o_with_snappi.py index 0d13eae92be..9e1c664ee6c 100644 --- a/tests/snappi_tests/pfcwd/test_pfcwd_m2o_with_snappi.py +++ b/tests/snappi_tests/pfcwd/test_pfcwd_m2o_with_snappi.py @@ -8,7 +8,7 @@ from tests.common.snappi_tests.qos_fixtures import prio_dscp_map, all_prio_list,\ lossless_prio_list, lossy_prio_list # noqa F401 -from .files.pfcwd_multi_node_helper import run_pfcwd_multi_node_test +from tests.snappi_tests.pfcwd.files.pfcwd_multi_node_helper import run_pfcwd_multi_node_test pytestmark = [pytest.mark.topology('tgen')] diff --git a/tests/snappi_tests/pfcwd/test_pfcwd_runtime_traffic_with_snappi.py b/tests/snappi_tests/pfcwd/test_pfcwd_runtime_traffic_with_snappi.py index 82ba487ef26..13a0ef1745b 100644 --- a/tests/snappi_tests/pfcwd/test_pfcwd_runtime_traffic_with_snappi.py +++ b/tests/snappi_tests/pfcwd/test_pfcwd_runtime_traffic_with_snappi.py @@ -7,7 +7,7 @@ snappi_api, snappi_testbed_config # noqa F401 from tests.common.snappi_tests.qos_fixtures import prio_dscp_map, all_prio_list # noqa F401 -from .files.pfcwd_runtime_traffic_helper import run_pfcwd_runtime_traffic_test +from tests.snappi_tests.pfcwd.files.pfcwd_runtime_traffic_helper import run_pfcwd_runtime_traffic_test pytestmark = [pytest.mark.topology('tgen')] diff --git a/tests/snappi_tests/qos/test_ipip_packet_reorder_with_snappi.py b/tests/snappi_tests/qos/test_ipip_packet_reorder_with_snappi.py index b7c6fbbce1d..1123c4dcc60 100644 --- a/tests/snappi_tests/qos/test_ipip_packet_reorder_with_snappi.py +++ b/tests/snappi_tests/qos/test_ipip_packet_reorder_with_snappi.py @@ -1,7 +1,7 @@ import logging import pytest -from files.packet_reorder_helper import run_ipip_packet_reorder_test +from tests.snappi_tests.qos.files.packet_reorder_helper import run_ipip_packet_reorder_test from tests.common.helpers.assertions import pytest_require from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\ fanout_graph_facts # noqa F401