-
Notifications
You must be signed in to change notification settings - Fork 818
[GCU E2E test] add stop pfcwd test #7308
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
Conversation
json_patch = [ | ||
{ | ||
"op": "remove", | ||
"path": "/PFC_WD/{}/detection_time".format(interface), | ||
}, | ||
{ | ||
"op": "remove", | ||
"path": "/PFC_WD/{}/restoration_time".format(interface), | ||
}, | ||
{ | ||
"op": "remove", | ||
"path": "/PFC_WD/{}/action".format(interface) | ||
} | ||
] | ||
|
||
try: | ||
tmpfile = generate_tmpfile(duthost) | ||
output = apply_patch(duthost, json_data=json_patch, dest_file=tmpfile) | ||
expect_op_success(duthost, output) | ||
pfcwd_updated_config = duthost.shell("show pfcwd config") | ||
pytest_assert(not pfcwd_config['rc'], "Unable to read updated pfcwd config") | ||
pytest_assert(interface not in pfcwd_updated_config['stdout'].split(), "pfcwd unexpectedly still running on interface {}".format(interface)) | ||
finally: | ||
delete_tmpfile(duthost, tmpfile) |
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.
this whole code needs to be indented. Needs to move under the 'for' block
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.
This test only intends to test one interface, as the flow would be the same for all interfaces. I added a break statement to the for loop to stop once the first interface is identified for test
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Add GCU E2E test for case where we stop pfcwd on specific port
How did you do it?
How did you verify/test it?
Run E2E test on physical DUT
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation