Skip to content
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

[chassisd][thermalctld] Import of mock libraries determined by environment variable #112

Merged
merged 1 commit into from
Nov 14, 2020
Merged

Conversation

jleveque
Copy link
Contributor

Previously, chassisd and thermalctld assumed that the swsscommon library would not be installed in the unit testing environment. This is not a valid assumption, and would cause unit tests to fail if swsscommon was available in the unit test environement, because it would get imported, but there would be no Redis DB to communicate with.

This PR uses environment variables, which are set by the unit tests themselves, to determine whether to load the real or mock libraries. This solution is similar to what is done in sonic-utilities.

@jleveque
Copy link
Contributor Author

@mprabhu-nokia, @Junchao-Mellanox: FYI.

@jleveque jleveque merged commit 9cab7ef into sonic-net:master Nov 14, 2020
@jleveque jleveque deleted the fix_mock_imports branch November 14, 2020 23:48
jleveque added a commit that referenced this pull request Nov 15, 2020
vdahiya12 pushed a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
…-net#112)

Previously 'Extended Specification compliance' was added as part of "sfp_info_bulk", this will request all the vendors to update the related platform API implementation due to the width change of "sfp_info_bulk".

To avoid this, make it parsed separately, it will not impact vendors who haven't update the platform API implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant