Skip to content

Enable Py3 for test_lag_member#14944

Merged
bingwang-ms merged 3 commits intosonic-net:masterfrom
saiarcot895:fix-lag-member-traffic
Oct 22, 2024
Merged

Enable Py3 for test_lag_member#14944
bingwang-ms merged 3 commits intosonic-net:masterfrom
saiarcot895:fix-lag-member-traffic

Conversation

@saiarcot895
Copy link
Contributor

@saiarcot895 saiarcot895 commented Oct 10, 2024

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

PR #14001 moved the lag_test PTF script into the Python 3 folder, but PR #14031 missed updating this test.

How did you do it?

Update this test to reflect that the lag_test script should be run under Python 3.

How did you verify/test it?

Tested it on KVM after removing the mark to skip this test case on KVM and skipping the ARP checks.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

PR sonic-net#14001 moved the lag_test PTF script into the Python 3 folder, but
PR sonic-net#14031 missed updating this test. Update this test to reflect that
the lag_test script should be run under Python 3.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@saiarcot895 saiarcot895 marked this pull request as ready for review October 15, 2024 23:39
@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/pc/test_lag_member.py:349:27: F811 redefinition of unused 'copy_acstests_directory' from line 13
tests/pc/test_lag_member.py:349:52: F811 redefinition of unused 'copy_ptftests_directory' from line 13

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Copy link
Contributor

@yaqiangz yaqiangz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bingwang-ms bingwang-ms merged commit a90dd22 into sonic-net:master Oct 22, 2024
@saiarcot895 saiarcot895 deleted the fix-lag-member-traffic branch October 22, 2024 01:17
sreejithsreekumaran pushed a commit to sreejithsreekumaran/sonic-mgmt that referenced this pull request Nov 15, 2024
* Enable Py3 for test_lag_member

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
liat-grozovik pushed a commit that referenced this pull request Dec 18, 2024
During movement test to Python 3 (#14944), were deleted necessary imports of fixtures with "autouse=True":
copy_ptftests_directory
copy_arp_responder_py

copy_arp_responder_py:
The fixture copied required configuration files. The arp responder configurations used in the test by method setup_arp_responder

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Feb 17, 2025
During movement test to Python 3 (sonic-net#14944), were deleted necessary imports of fixtures with "autouse=True":
copy_ptftests_directory
copy_arp_responder_py

copy_arp_responder_py:
The fixture copied required configuration files. The arp responder configurations used in the test by method setup_arp_responder

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
mssonicbld pushed a commit that referenced this pull request Feb 17, 2025
During movement test to Python 3 (#14944), were deleted necessary imports of fixtures with "autouse=True":
copy_ptftests_directory
copy_arp_responder_py

copy_arp_responder_py:
The fixture copied required configuration files. The arp responder configurations used in the test by method setup_arp_responder

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants