sonic-mgmt
sonic-mgmt copied to clipboard
fix QoS test skips
Description of PR
Summary: fix skipping of QoS tests Fixes # (issue)
-
fixes https://github.com/sonic-net/sonic-mgmt/issues/6714
-
returned original skip for test testQosSaiHeadroomPoolWatermark
During transition to conditional_mark/tests_mark_conditions.yaml
, the test testQosSaiHeadroomPoolWatermark was made to xfail instead of skipping it as it was done originally. Reverted the original behavior
Type of change
- [x] 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?
Fix test skips
How did you do it?
Corrected test skip declaration at conditional_mark/tests_mark_conditions.yaml
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
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...............................................................Failed
- hook id: check-yaml
- exit code: 1
while constructing a mapping
in "tests/common/plugins/conditional_mark/tests_mark_conditions.yaml", line 779, column 3
found duplicate key "skip" with value "{}" (original value: "{}")
in "tests/common/plugins/conditional_mark/tests_mark_conditions.yaml", line 783, column 3
To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
check for added large files..............................................Passed
check python ast.....................................(no files to check)Skipped
flake8...............................................(no files to check)Skipped
To run the pre-commit checks locally, you can follow below steps:
- 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.
- Ensure that the
pre-commit
package is installed:
sudo pip install pre-commit
- Go to repository root folder
- Install the pre-commit hooks:
pre-commit install
- Use pre-commit to check staged file:
pre-commit
- Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>
pre-commit failed on a file check tests_mark_conditions.yaml
because of a block this PR does not modify:
snmp/test_snmp_queue.py:
skip:
reason: "Interfaces not present on supervisor node"
conditions:
- "is_supervisor"
skip:
reason: "M0 topo does not support test_snmp_queue"
conditions:
- "topo_name in ['m0']"
@yutongzhang-microsoft @wangxin @ZhaohuiS take a look please
@XuChen-MSFT Could you please review this PR?