-
Notifications
You must be signed in to change notification settings - Fork 153
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
[thermalctld] Refactor to allow for greater unit test coverage; Add more unit tests #157
Merged
jleveque
merged 43 commits into
sonic-net:master
from
jleveque:increase_thermalctld_coverage
Mar 18, 2021
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
011b96b
[thermalctld] Refactor to allow for greater unit test coverage
jleveque b814e16
Increase pytest verbosity
jleveque 126263c
Refactor unit tests to align with source
jleveque 2156279
Add mocked swsscommon lib
jleveque 5198692
Remove THERMALCTLD_UNIT_TESTING env var
jleveque 7663fa0
Use pytest fixture for setup/teardown
jleveque 082f3c0
Use call_count in favor of assert_called[_once]
jleveque 53fea67
Fix test bug and check both instances to ensure class var is correct
jleveque a2df880
[mock_platform] inherit from sonic_platform_base
jleveque aca1580
Update mock_platform.py
jleveque e25363c
Tests use new setters
jleveque 02bc7ab
Use parens instead of escaping newlines
jleveque b118e0e
Change 'absence' to 'absent', 'fault' to 'faulty' where applicable
jleveque 13ddb52
Add tests for signal handler
jleveque c72e31e
import sys
jleveque 04eb5ef
Add MockThermalManager class to mock_platform.py
jleveque f4a036a
Replace 'deinit()' methods with actual destructors
jleveque ff163a7
Replace 'takes' with 'took'
jleveque ba8069e
Use more modern method of initializing base class
jleveque 8b480d5
Go back to deinitializer methods
jleveque 487278f
become -> became
jleveque 873827e
Add tests for ThermalControlDaemon.run() and main()
jleveque 79151bf
Add test_temperupdater_deinit
jleveque 4d5f6ea
Grammar tweaks, pluralize message dynamically
jleveque 0321f2a
Temp test
jleveque b9ae023
Remove unnecessary periods from log messages to align all
jleveque 2e8409f
Add test case for TemperatureStatus.set_temperature when temp is not …
jleveque dd14af4
Add TestFanStatus class and test_check_speed_value_available method
jleveque c4de3fc
Add test case for try_get()
jleveque 720b8b8
Add TestFanUpdater class and test_deinit() method
jleveque 5315205
Add test case for FanUpdater._refresh_fan_drawer_status
jleveque f019f50
Fix grammar, add details to log messages
jleveque 4f5db27
Add test case for update_entity_info()
jleveque 006cbc9
Add test_set_fan_led_exception
jleveque 637822b
[ThermalMonitor] Break loop logic out into separate function for unit…
jleveque 74447f7
Add TestThermalMonitor class and test_main() method
jleveque 04f0838
[TestFanUpdater] Add PSU fan test
jleveque 41a3996
Add TestTemperatureUpdater class and test_update_psu_thermals() metho…
jleveque 89a797f
Remove 'repr()' around exception to make log message identical betwee…
jleveque 1c2c631
Check for more log messages
jleveque a5af749
Add MockSfpBase class to mock_platform.py
jleveque 8e28094
Add test_update_sfp_thermals
jleveque 3104fdf
Switch back to printing 'repr(e)'
jleveque File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[pytest] | ||
addopts = --cov=scripts --cov-report html --cov-report term --cov-report xml --junitxml=test-results.xml -v | ||
addopts = --cov=scripts --cov-report html --cov-report term --cov-report xml --junitxml=test-results.xml -vv |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.
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.
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.
@jleveque this dependency is causing sonic-net/sonic-buildimage#7143 sonic-buildimage to fail.
Do we need to remove it or add something ?
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.
PR to add dependency in sonic-buildimage here