Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test for align watermark flow with port configuration #6907

Merged

Conversation

dbarashinvd
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

add a verification test for feature align watermark flow with port configuration

How did you do it?

new verification test

How did you verify/test it?

run it on several switches

Any platform specific information?

not platform specific

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

any topology

Documentation

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

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/platform_tests/counterpoll/test_counterpoll_watermark.py:32:15: E201 whitespace after '{'
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:32:24: E203 whitespace before ':'
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:32:35: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:33:1: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:33:35: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:34:1: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:34:1: E231 missing whitespace after ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:34:28: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:35:1: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:35:1: E231 missing whitespace after ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:35:27: E203 whitespace before ','
...
[truncated extra lines, please run pre-commit locally to view full check results]

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>

@dbarashinvd dbarashinvd marked this pull request as ready for review November 28, 2022 16:24
@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

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/platform_tests/counterpoll/test_counterpoll_watermark.py:32:32: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:33:5: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:33:39: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:34:13: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:34:41: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:35:13: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:35:40: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:36:13: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:39:26: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:40:5: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:40:37: E203 whitespace before ','
...
[truncated extra lines, please run pre-commit locally to view full check results]

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>

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

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/platform_tests/counterpoll/test_counterpoll_watermark.py:32:121: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:34:1: E124 closing bracket does not match visual indentation
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:37:1: E124 closing bracket does not match visual indentation
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:43:44: E231 missing whitespace after ':'
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:44:45: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:44:84: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:45:17: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:46:26: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:46:120: E203 whitespace before ','
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:47:17: E128 continuation line under-indented for visual indent
tests/platform_tests/counterpoll/test_counterpoll_watermark.py:48:49: E128 continuation line under-indented for visual indent
...
[truncated extra lines, please run pre-commit locally to view full check results]

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>

wsycqyz
wsycqyz previously approved these changes Dec 16, 2022
@bingwang-ms
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik liat-grozovik merged commit 9a226c4 into sonic-net:master Dec 26, 2022
@ZhaohuiS ZhaohuiS mentioned this pull request Dec 30, 2022
6 tasks
StormLiangMS pushed a commit that referenced this pull request Dec 30, 2022
What is the motivation for this PR?
PR #6907 introduced the following error:

_ ERROR collecting tests/platform_tests/counterpoll/test_counterpoll_watermark.py _
Fixture "backup_and_restore_config_db" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
How did you do it?
Remove unnecessary usefixtures.

How did you verify/test it?
run platform_tests/counterpoll/test_counterpoll_watermark.py
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