remove testing skipped modules in "platform_tests/api/test_module.py::TestModuleApi::test_get_presence" completely#6161
Merged
gechiang merged 2 commits intosonic-net:masterfrom Aug 17, 2022
gechiang:master
Merged
remove testing skipped modules in "platform_tests/api/test_module.py::TestModuleApi::test_get_presence" completely#6161gechiang merged 2 commits intosonic-net:masterfrom gechiang:master
gechiang merged 2 commits intosonic-net:masterfrom
gechiang:master
Conversation
in test_get_presence() there is a new check added by PR (#2985): name = module.get_name(platform_api_conn, i) if name in self.skip_mod_list: self.expect(presence is False, "Module {} is not present".format(i)) else: self.expect(presence is True, "Module {} is not present".format(i)) I am seeing some issue with the above logic. In our testbed where we share a physical chassis that uses the same Supervisor card but group different LCs for different "logical chassis" so for some "logical chassis" some LCs are added to "skip_mod_list" as they are not meant to be tested for that logical chassis. Our expectation is that if it is marked as skipped, it is not meant for testing and no state of those skipped modules should be used for any validation logic. We should always trust what the inventory marked as skipped and not try to look at whatever state the "skipped module" should be.
Update test_module.py
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
allen-xf
pushed a commit
to allen-xf/sonic-mgmt
that referenced
this pull request
Oct 28, 2022
in test_get_presence() there is a new check added by PR (sonic-net#2985): name = module.get_name(platform_api_conn, i) if name in self.skip_mod_list: self.expect(presence is False, "Module {} is not present".format(i)) else: self.expect(presence is True, "Module {} is not present".format(i)) I am seeing some issue with the above logic. In our testbed where we share a physical chassis that uses the same Supervisor card but group different LCs for different "logical chassis" so for some "logical chassis" some LCs are added to "skip_mod_list" as they are not meant to be tested for that logical chassis. Our expectation is that if it is marked as skipped, it is not meant for testing and no state of those skipped modules should be used for any validation logic. We should always trust what the inventory marked as skipped and not try to look at whatever state the "skipped module" should be.
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.
in test_get_presence() there is a new check added by PR (#2985):
I am seeing some issue with the above logic.
In our testbed where we share a physical chassis that uses the same Supervisor card but group different LCs for different "logical chassis" so for some "logical chassis" some LCs are added to "skip_mod_list" as they are not meant to be tested for that logical chassis. Our expectation is that if it is marked as skipped, it is not meant for testing and no state of those skipped modules should be used for any validation logic. We should always trust what the inventory marked as skipped and not try to look at whatever state the "skipped module" should be.
Description of PR
Summary:
Fixes # (#6160)
Type of change
Back port request
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Tried it out on the same logical chassis that I observed the issue and with the testcase modified it passes just fine.
Here is what got captured inside the test log showing the skipped module names that should be skipped and were correctly skipped:
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation