Skip to content

Commit

Permalink
workign on coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshraghupathy committed Nov 14, 2024
1 parent 550052b commit 3e33d4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sonic-chassisd/tests/test_chassisd.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ def test_smartswitch_module_db_update():
module_updater.persist_dpu_reboot_cause(reboot_cause, key)
module_updater._is_first_boot(name)
module_updater.persist_dpu_reboot_time(name)
module_updater.update_dpu_reboot_cause_to_db(name)
# Verify that the custom open was called with the expected file path
# mock_file_instance = open(expected_path)
# mock_file_instance.write.assert_any_call("cause: Power loss\n")
Expand Down Expand Up @@ -749,6 +750,9 @@ def test_midplane_presence_dpu_modules(mock_open, mock_makedirs):
assert module.get_midplane_ip() == fvs[CHASSIS_MIDPLANE_INFO_IP_FIELD]
assert str(module.is_midplane_reachable()) == fvs[CHASSIS_MIDPLANE_INFO_ACCESS_FIELD]

# Run chassis db clean up
module_updater.module_down_chassis_db_cleanup()

#Deinit
module_updater.deinit()
fvs = midplane_table.get(name)
Expand Down

0 comments on commit 3e33d4b

Please sign in to comment.