Skip to content

Commit

Permalink
Fix test_thermalctld to handle thermal_manager.get_interval
Browse files Browse the repository at this point in the history
  • Loading branch information
andywongarista committed Jun 30, 2021
1 parent fa406d2 commit 6dfe286
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sonic-thermalctld/tests/test_thermalctld.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ def test_signal_handler():
def test_daemon_run():
daemon_thermalctld = thermalctld.ThermalControlDaemon()
daemon_thermalctld.stop_event.wait = mock.MagicMock(return_value=True)
daemon_thermalctld.thermal_manager.get_interval = mock.MagicMock(return_value=60)
ret = daemon_thermalctld.run()
daemon_thermalctld.deinit() # Deinit becuase the test will hang if we assert
assert ret is False
Expand Down

0 comments on commit 6dfe286

Please # to comment.