Skip to content

Commit 69788c2

Browse files
Fix: Set default values for kdump enhancement (#217)
* fixed default values issue in PR216 * changed path start with /
1 parent d7e8021 commit 69788c2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/hostcfgd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,8 +1140,8 @@ class KdumpCfg(object):
11401140
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M",
11411141
"num_dumps": "3",
11421142
"remote": "false", # New feature: remote, default is "false"
1143-
"ssh_string": "<user@server>", # New feature: SSH key, default value
1144-
"ssh_path": "<path>" # New feature: SSH path, default value
1143+
"ssh_string": "user@localhost", # New feature: SSH key, default value
1144+
"ssh_path": "/a/b/c" # New feature: SSH path, default value
11451145
}
11461146

11471147
def load(self, kdump_table):

tests/hostcfgd/hostcfgd_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ def test_kdump_event(self):
217217
call(['sonic-kdump-config', '--num_dumps', '3']),
218218
call(['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M']),
219219
call(['sonic-kdump-config', '--remote', 'false']), # Covering remote
220-
call(['sonic-kdump-config', '--ssh_string', '<user@server>']), # Covering ssh_string
221-
call(['sonic-kdump-config', '--ssh_path', '<path>']) # Covering ssh_path
220+
call(['sonic-kdump-config', '--ssh_string', 'user@localhost']), # Covering ssh_string
221+
call(['sonic-kdump-config', '--ssh_path', '/a/b/c']) # Covering ssh_path
222222
]
223223
mocked_subprocess.check_call.assert_has_calls(expected, any_order=True)
224224

0 commit comments

Comments
 (0)