Skip to content

Commit

Permalink
working on coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshraghupathy committed Sep 2, 2024
1 parent 6f02d44 commit 77d3901
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sonic-chassisd/scripts/chassisd
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ class SmartSwitchModuleUpdater(ModuleUpdater):
key = module_info_dict[CHASSIS_MODULE_INFO_NAME_FIELD]

if not key.startswith(ModuleBase.MODULE_TYPE_DPU):
self.log_error("Incorrect module-name {}. Should start with {} or {} or {} or {}".format(key,
ModuleBase.MODULE_TYPE_DPU))
self.log_error("Incorrect module-name {}. Should start with {} ".format(key,
ModuleBase.MODULE_TYPE_DPU))
continue

fvs = swsscommon.FieldValuePairs([(CHASSIS_MODULE_INFO_DESC_FIELD, module_info_dict[CHASSIS_MODULE_INFO_DESC_FIELD]),
Expand Down
4 changes: 2 additions & 2 deletions sonic-chassisd/tests/test_chassisd.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ def test_smartswitch_moduleupdater_check_invalid_name():
slot, module.supervisor_slot)
module_updater.module_db_update()
fvs = module_updater.module_table.get(name)
# assert fvs == None
assert fvs == None

admin_state = 0
config_updater.module_config_update(name, admin_state)

# No change since invalid key
# assert module.get_admin_state() != admin_state
assert module.get_admin_state() != admin_state

def test_moduleupdater_check_invalid_name():
chassis = MockChassis()
Expand Down

0 comments on commit 77d3901

Please sign in to comment.