-
Notifications
You must be signed in to change notification settings - Fork 740
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
[generic-config-updater][Add/Remove rack] - Updated test to include add/remove rack via patch-apply #5002
[generic-config-updater][Add/Remove rack] - Updated test to include add/remove rack via patch-apply #5002
Conversation
2) Added two hacks into generic test to get over issue sonic-net#2007 (under git repo sonic-utilities) 3) Moved some code to common 4) Added more test flags to run partial combos
2) Creating patch files is moved as part test preparation Now you can just create all required files w/o any testing.
…to avoid taking diffs of unrelated objects updated by control plne modules
This pull request introduces 15 alerts and fixes 3 when merging 7849008 into cd8c365 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 15 alerts and fixes 3 when merging a737faaecf885379ba7ca275bdba9fba8705e3cd into b36f7db - view on LGTM.com new alerts:
fixed alerts:
|
Ansible test run succeeded. |
Above failed test runs are unrelated to this PR. |
Is In reply to: 1027217195 In reply to: 1027217195 Refers to: tests/configlet/test_add_rack.py:22 in 45f12f8. [](commit_id = 45f12f8, deletion_comment = False) |
tests/configlet/util/base_test.py
Outdated
|
||
init(duthost) | ||
|
||
fpath = "/usr/local/lib/python3.9/dist-packages/generic_config_updater/services_validator.py" |
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.
/usr/local/lib/python3.9/dist-packages/generic_config_updater/services_validator.py
fpath = "/usr/local/lib/python3.9/dist-packages/generic_config_updater/services_validator.py"
Python version keeps increasing along with Debian version. So it is not future proof in test.
If your purpose is to check feature availability. You may use python3 -c 'import generic_config_updater'
. #Closed
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.
Good point. Resolved.
log_debug("Created data_dir={} version={}".format(data_dir, init_data["version"])) | ||
|
||
|
||
def backup_minigraph(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.
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 does in special way of creating a copy as /etc/sonic/orig/minigraph.xml.addRack.orig. I prefer it that way.
This feature is exposed to both manual & Ansible.
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.
As comments
a737faa
to
59cdf87
Compare
removed "yield 0" |
This pull request introduces 2 alerts and fixes 3 when merging b399799 into 79a8403 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 2 alerts and fixes 3 when merging 5bbcc42 into 79a8403 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 2 alerts and fixes 3 when merging ee2e72b into 79a8403 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request fixes 3 alerts when merging 45f12f8 into 79a8403 - view on LGTM.com fixed alerts:
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Description of PR
Summary:
Updated test to add/remove rack using generic-config-updater.
Type of change
Back port request
Approach
What is the motivation for this PR?
How did you do it?
4.1) Load minigraph w/o T0
4.2) Apply patch to add T0
4.3) Get DB dumps
4.4) Compare dumps with those obtained upon loading original minigraph that had all T0s
5.1) Ensure T0 is currently present (following step 4 ensures that)
5.2) Apply patch to remove T0
5.3) Get DB dumps
5.4) Compare with dumps ta upon loading minigraph w/o T0
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation