Skip to content

Fix pre-commit check errors in platform_tests/conftest.py#7049

Merged
msosyak merged 3 commits intosonic-net:masterfrom
bratashX:fix_pre-commit-check
Dec 19, 2022
Merged

Fix pre-commit check errors in platform_tests/conftest.py#7049
msosyak merged 3 commits intosonic-net:masterfrom
bratashX:fix_pre-commit-check

Conversation

@bratashX
Copy link
Copy Markdown
Contributor

@bratashX bratashX commented Dec 16, 2022

Signed-off-by: Petro Bratash [email protected]

Description of PR

Fix the next pre-commit check error in tests/platform_tests/conftest.py:

tests/platform_tests/conftest.py:12:1: F401 'tests.common.fixtures.advanced_reboot.get_advanced_reboot' imported but unused
tests/platform_tests/conftest.py:37:1: E302 expected 2 blank lines, found 1
tests/platform_tests/conftest.py:135:47: E231 missing whitespace after ','
tests/platform_tests/conftest.py:150:28: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:166:1: E302 expected 2 blank lines, found 1
tests/platform_tests/conftest.py:181:1: E302 expected 2 blank lines, found 1
tests/platform_tests/conftest.py:219:5: F841 local variable 'reboot_time' is assigned to but never used
tests/platform_tests/conftest.py:241:121: E501 line too long (125 > 120 characters)
tests/platform_tests/conftest.py:250:75: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:251:13: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:252:17: E127 continuation line over-indented for visual indent
tests/platform_tests/conftest.py:254:75: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:255:13: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:256:17: E127 continuation line over-indented for visual indent
tests/platform_tests/conftest.py:259:78: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:260:17: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:263:86: E502 the backslash is redundant between brackets

tests/platform_tests/conftest.py:253:13: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:254:17: E127 continuation line over-indented for visual indent
tests/platform_tests/conftest.py:257:13: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:258:17: E127 continuation line over-indented for visual indent
tests/platform_tests/conftest.py:262:17: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:266:21: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:268:78: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:269:21: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:293:121: E501 line too long (125 > 120 characters)
tests/platform_tests/conftest.py:296:121: E501 line too long (122 > 120 characters)
tests/platform_tests/conftest.py:302:74: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:303:17: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:311:36: W605 invalid escape sequence '['
tests/platform_tests/conftest.py:311:38: W605 invalid escape sequence ']'
tests/platform_tests/conftest.py:311:43: E231 missing whitespace after ','
tests/platform_tests/conftest.py:311:51: E231 missing whitespace after ','
tests/platform_tests/conftest.py:311:60: E261 at least two spaces before inline comment
tests/platform_tests/conftest.py:327:42: E231 missing whitespace after ','
tests/platform_tests/conftest.py:329:42: E231 missing whitespace after ','
tests/platform_tests/conftest.py:330:97: E231 missing whitespace after ','
tests/platform_tests/conftest.py:332:87: E231 missing whitespace after ','
tests/platform_tests/conftest.py:334:85: E231 missing whitespace after ','
tests/platform_tests/conftest.py:339:99: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:340:13: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:346:113: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:347:17: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:352:100: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:353:13: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:355:13: E125 continuation line with same indent as next logical line
tests/platform_tests/conftest.py:366:112: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:367:21: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:369:103: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:370:21: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:381:22: E225 missing whitespace around operator
tests/platform_tests/conftest.py:384:13: E127 continuation line over-indented for visual indent
tests/platform_tests/conftest.py:433:29: E225 missing whitespace around operator
tests/platform_tests/conftest.py:449:85: E712 comparison to True should be 'if cond is True:' or 'if cond:'
tests/platform_tests/conftest.py:471:85: E712 comparison to True should be 'if cond is True:' or 'if cond:'
tests/platform_tests/conftest.py:474:21: E131 continuation line unaligned for hanging indent
tests/platform_tests/conftest.py:475:25: E131 continuation line unaligned for hanging indent
tests/platform_tests/conftest.py:480:121: E501 line too long (121 > 120 characters)
tests/platform_tests/conftest.py:490:103: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:491:21: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:503:81: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:504:21: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:522:9: E303 too many blank lines (2)
tests/platform_tests/conftest.py:522:84: E502 the backslash is redundant between brackets
tests/platform_tests/conftest.py:523:13: E128 continuation line under-indented for visual indent
tests/platform_tests/conftest.py:592:96: E231 missing whitespace after ','
tests/platform_tests/conftest.py:592:121: E501 line too long (127 > 120 characters)
tests/platform_tests/conftest.py:602:95: E231 missing whitespace after ','
tests/platform_tests/conftest.py:602:121: E501 line too long (126 > 120 characters)
tests/platform_tests/conftest.py:632:6: E111 indentation is not a multiple of 4
tests/platform_tests/conftest.py:632:6: E117 over-indented

@bratashX bratashX requested a review from sujinmkang as a code owner December 16, 2022 15:49
@bratashX bratashX changed the title Fix pre-commit check err in platform_tests/conftest.py Fix pre-commit check errors in platform_tests/conftest.py Dec 16, 2022
Signed-off-by: Petro Bratash <[email protected]>
Signed-off-by: Petro Bratash <[email protected]>
@bratashX bratashX force-pushed the fix_pre-commit-check branch 12 times, most recently from e834005 to 185b84d Compare December 16, 2022 19:30
Signed-off-by: Petro Bratash <[email protected]>
@msosyak msosyak merged commit 51f9c02 into sonic-net:master Dec 19, 2022
@bratashX bratashX deleted the fix_pre-commit-check branch December 19, 2022 09:50
vaibhavhd added a commit that referenced this pull request Jan 6, 2023
…-responder on single TOR (#7188)

This PR fixes two recently introduced issues:

Fix advanced reboot tests fail on non-dualtor testbeds #7146 caused by [advanced-reboot] IO path verification fixes for dualtor #6968
After merge of PR Fix pre-commit check errors in platform_tests/conftest.py #7049 , all testcases using get_advanced_reboot fixture are failing due to fixture 'get_advanced_reboot' not found
How did you do it?
To fix 7146, do not run GARP service and ICMP responder for non-dualtor advanced-reboot cases. I have not added a more simple skip for non-dualtor as these services are still needed for MOCK dualtor cases which run on single TOR testbeds.

To fix 2, added a new import in the test scripts directly.
wangxin pushed a commit that referenced this pull request Apr 20, 2023
…-responder on single TOR (#7188)

This PR fixes two recently introduced issues:

Fix advanced reboot tests fail on non-dualtor testbeds #7146 caused by [advanced-reboot] IO path verification fixes for dualtor #6968
After merge of PR Fix pre-commit check errors in platform_tests/conftest.py #7049 , all testcases using get_advanced_reboot fixture are failing due to fixture 'get_advanced_reboot' not found
How did you do it?
To fix 7146, do not run GARP service and ICMP responder for non-dualtor advanced-reboot cases. I have not added a more simple skip for non-dualtor as these services are still needed for MOCK dualtor cases which run on single TOR testbeds.

To fix 2, added a new import in the test scripts directly.
vaibhavhd added a commit that referenced this pull request Apr 26, 2023
#8108)

The test_advanced_reboot fails on master branch when it fails to reboot the device, and fails w/ incorrect error: DUT hasn't shutdown in 300 seconds.
In reality the device is not rebooted at all as the test library crashes while doing so. The error is apparent when traceback is enabled in the code.

This PR fixes the error (introduced after change in #7817), added traceback for better debug support.
Also, this fixes a part where reboot timing data is not printed entirely as the logs path can't be parsed due to a change in
#7049

Tested on physical testbed
mrkcmo pushed a commit to Azarack/sonic-mgmt that referenced this pull request Oct 3, 2023
sonic-net#8108)

The test_advanced_reboot fails on master branch when it fails to reboot the device, and fails w/ incorrect error: DUT hasn't shutdown in 300 seconds.
In reality the device is not rebooted at all as the test library crashes while doing so. The error is apparent when traceback is enabled in the code.

This PR fixes the error (introduced after change in sonic-net#7817), added traceback for better debug support.
Also, this fixes a part where reboot timing data is not printed entirely as the logs path can't be parsed due to a change in
sonic-net#7049

Tested on physical testbed
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
sonic-net#8108)

The test_advanced_reboot fails on master branch when it fails to reboot the device, and fails w/ incorrect error: DUT hasn't shutdown in 300 seconds.
In reality the device is not rebooted at all as the test library crashes while doing so. The error is apparent when traceback is enabled in the code.

This PR fixes the error (introduced after change in sonic-net#7817), added traceback for better debug support.
Also, this fixes a part where reboot timing data is not printed entirely as the logs path can't be parsed due to a change in
sonic-net#7049

Tested on physical testbed
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.

3 participants