Make GCU syslog's test independent from previous test#4839
Merged
wen587 merged 7 commits intosonic-net:masterfrom Dec 24, 2021
Merged
Make GCU syslog's test independent from previous test#4839wen587 merged 7 commits intosonic-net:masterfrom
wen587 merged 7 commits intosonic-net:masterfrom
Conversation
qiluo-msft
reviewed
Dec 22, 2021
qiluo-msft
reviewed
Dec 22, 2021
qiluo-msft
reviewed
Dec 22, 2021
| original_syslog_servers: original syslog servers stored in config | ||
| """ | ||
| duthost = duthosts[rand_one_dut_hostname] | ||
| create_checkpoint(duthost) |
Contributor
Contributor
Author
There was a problem hiding this comment.
We want it to rolled back to original setup. Cuz the test env is based on original setup.
If we created before yield, it will rollback to config_cleanup or config_add_default and we will need to add rollback check for each setup.
To move the checkpoint just before yield, we can either
- move each setup code inside test,
- or do another rollback to original setup.
or we can keep the current setup.
Contributor
There was a problem hiding this comment.
It's a good idea to rollback twice.
qiluo-msft
approved these changes
Dec 24, 2021
AntonHryshchuk
pushed a commit
to AntonHryshchuk/sonic-mgmt
that referenced
this pull request
Jan 4, 2022
sonic-net#4839) Summary: Make syslog test run independently; add rollback test. What is the motivation for this PR? To avoid testing on one test case that is dependent on the previous test. How did you do it? Setup prerequisite environment for each test and rollback to original setup How did you verify/test it? Run test of sonic-mgmt/tests/generic_config_updater/test_syslog.py on KVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary: Make GCU syslog test independent from previous test
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
To avoid testing on one test case that is dependent on the previous test.
How did you do it?
Setup prerequisite environment for each test
How did you verify/test it?
Run test of sonic-mgmt/tests/generic_config_updater/test_syslog.py on KVM
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation