Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions tests/pc/test_lag_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from tests.common.helpers.assertions import pytest_assert, pytest_require
from tests.ptf_runner import ptf_runner
from tests.common.utilities import wait_until
from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory, copy_arp_responder_py # noqa F401
from tests.common.fixtures.ptfhost_utils import copy_acstests_directory # noqa F401
from tests.common.config_reload import config_reload

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -346,21 +346,11 @@ def get_vlan_id(cfg_facts, number_of_lag_member):


@pytest.fixture(scope="module")
def common_setup_teardown(ptfhost):
def common_setup_teardown(copy_acstests_directory, ptfhost): # noqa: F811
logger.info("########### Setup for lag testing ###########")

ptfhost.shell("mkdir -p {}".format(TEST_DIR))
# Copy PTF test into PTF-docker for test LACP DU
test_files = ["lag_test.py", "acs_base_test.py", "router_utils.py"]
for test_file in test_files:
src = "../ansible/roles/test/files/acstests/%s" % test_file
dst = TEST_DIR + test_file
ptfhost.copy(src=src, dest=dst)

yield ptfhost

ptfhost.file(path=TEST_DIR, state="absent")


@pytest.fixture(scope="module")
def ptf_dut_setup_and_teardown(duthost, ptfhost, tbinfo, most_common_port_speed):
Expand Down Expand Up @@ -464,7 +454,7 @@ def run_lag_member_traffic_test(duthost, dut_vlan, ptf_ports, ptfhost):
"ptf_lag": ptf_lag,
ATTR_PORT_NOT_BEHIND_LAG: ptf_not_lag
}
ptf_runner(ptfhost, TEST_DIR, "lag_test.LagMemberTrafficTest", "/root/ptftests", params=params)
ptf_runner(ptfhost, 'acstests', "lag_test.LagMemberTrafficTest", "/root/ptftests", params=params, is_python3=True)


def test_lag_member_traffic(common_setup_teardown, duthost, ptf_dut_setup_and_teardown):
Expand Down