Skip to content

Commit

Permalink
Trying to improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshraghupathy committed Oct 1, 2024
1 parent 49868a5 commit b366b2d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sonic-chassisd/tests/test_chassisd.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,16 @@ def test_daemon_run_smartswitch():
module_type = ModuleBase.MODULE_TYPE_DPU
module = MockModule(index, name, desc, module_type, slot, serial)
module.set_midplane_ip()
# Set initial state
status = ModuleBase.MODULE_STATUS_PRESENT
module.set_oper_status(status)
chassis.module_list.append(module)

# Supervisor ModuleUpdater
module_updater = SmartSwitchModuleUpdater(SYSLOG_IDENTIFIER, chassis)
module_updater.module_db_update()
sup_module_updater.modules_num_update()

daemon_chassisd = ChassisdDaemon(SYSLOG_IDENTIFIER)
daemon_chassisd.stop = MagicMock()
daemon_chassisd.stop.wait.return_value = True
Expand Down

0 comments on commit b366b2d

Please sign in to comment.