From 3e33d4b0220060635f26a832773cf151fef1341c Mon Sep 17 00:00:00 2001 From: Ramesh Raghupathy Date: Wed, 13 Nov 2024 19:37:53 -0800 Subject: [PATCH] workign on coverage --- sonic-chassisd/tests/test_chassisd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sonic-chassisd/tests/test_chassisd.py b/sonic-chassisd/tests/test_chassisd.py index 0fbf6c9d7..589acd919 100644 --- a/sonic-chassisd/tests/test_chassisd.py +++ b/sonic-chassisd/tests/test_chassisd.py @@ -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") @@ -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)