Skip to content

Commit

Permalink
fixed default values issue in PR216
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadalihussnain committed Feb 13, 2025
1 parent 7e1b280 commit 9d16af0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/hostcfgd
Original file line number Diff line number Diff line change
Expand Up @@ -1141,8 +1141,8 @@ class KdumpCfg(object):
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M",
"num_dumps": "3",
"remote": "false", # New feature: remote, default is "false"
"ssh_string": "<user@server>", # New feature: SSH key, default value
"ssh_path": "<path>" # New feature: SSH path, default value
"ssh_string": "user@localhost", # New feature: SSH key, default value
"ssh_path": "a/b/c" # New feature: SSH path, default value
}

def load(self, kdump_table):
Expand Down
4 changes: 2 additions & 2 deletions tests/hostcfgd/hostcfgd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ def test_kdump_event(self):
call(['sonic-kdump-config', '--num_dumps', '3']),
call(['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M']),
call(['sonic-kdump-config', '--remote', 'false']), # Covering remote
call(['sonic-kdump-config', '--ssh_string', '<user@server>']), # Covering ssh_string
call(['sonic-kdump-config', '--ssh_path', '<path>']) # Covering ssh_path
call(['sonic-kdump-config', '--ssh_string', 'user@localhost']), # Covering ssh_string
call(['sonic-kdump-config', '--ssh_path', 'a/b/c']) # Covering ssh_path
]
mocked_subprocess.check_call.assert_has_calls(expected, any_order=True)

Expand Down

0 comments on commit 9d16af0

Please sign in to comment.