-
Notifications
You must be signed in to change notification settings - Fork 750
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
[ip/test_mgmt_ipv6_only]: Refactor to properly cleanup on failure #16442
base: master
Are you sure you want to change the base?
[ip/test_mgmt_ipv6_only]: Refactor to properly cleanup on failure #16442
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
ipv6 mgmt only tests can fail in setup, after config has been modified, leading to the teardown to not be run. Refactor the test to split backing up and restoring the config into another fixture, such that failures in setting the mgmt IPs wont nuke the testbed. Also refactor some other aspects to remove linter bypasses Signed-off-by: Liam Kearney <[email protected]>
1fa636d
to
43def98
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
09449ef
to
7494644
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Liam Kearney <[email protected]>
7494644
to
1079df2
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -55,10 +53,8 @@ def check_ntp_status(host): | |||
return True | |||
|
|||
|
|||
def run_ntp(duthosts, rand_one_dut_hostname, setup_ntp): | |||
def run_ntp(duthost): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm we're removing setup_ntp
here because the fixtures are/should be called locally and not used in this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, in this case its redundant - the fixture is not called / used here as this is not a test function. The fixtures are only invoked by the test_xxx
functions / or other fixtures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@arlakshm @yejianquan pls review when you get the chance, thanks |
Description of PR
ipv6 mgmt only tests can fail in setup, after config has been modified, leading to the teardown to not be run, and the duts to be left in an unreachable state. Refactor the test to split backing up and restoring the config into an independent fixture, such that failures in setting the mgmt IPs won't nuke the testbed. Also refactor / cleanup some other aspects of the tests to enhance clarity.
Summary:
Fixes #16441
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix failures in test setup leaving the testbed in a wedged state, due to removed ipv4 mgmt IPs
How did you do it?
Refactor the test to have config backup and restore in a separate fixture
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation