Skip to content

Commit c8c5106

Browse files
committed
var rename
1 parent 65111e9 commit c8c5106

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

nodescraper/plugins/inband/dmesg/collector_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ class DmesgCollectorArgs(CollectorArgs):
3636

3737
collect_rotated_logs: bool = False
3838
skip_sudo: bool = False
39-
collect_dmesg_log: bool = True
39+
log_dmesg_data: bool = True

nodescraper/plugins/inband/dmesg/dmesg_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def collect_data(
156156

157157
if dmesg_content:
158158
dmesg_data = DmesgData(
159-
dmesg_content=dmesg_content, skip_log_file=not args.collect_dmesg_log
159+
dmesg_content=dmesg_content, skip_log_file=not args.log_dmesg_data
160160
)
161161
self.result.message = "Dmesg data collected"
162162
return self.result, dmesg_data

test/functional/test_plugin_configs.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,13 @@ def test_all_plugin_config_files_exist(plugin_config_files):
285285
assert plugin_name in config["plugins"]
286286

287287

288-
def test_dmesg_plugin_collect_dmesg_log_false(run_cli_command, tmp_path):
289-
"""Test DmesgPlugin with collect_dmesg_log=false doesn't write dmesg.log."""
288+
def test_dmesg_plugin_log_dmesg_data_false(run_cli_command, tmp_path):
289+
"""Test DmesgPlugin with log_dmesg_data=false doesn't write dmesg.log."""
290290
config = {
291291
"name": "DmesgNoLogConfig",
292-
"desc": "DmesgPlugin config with collect_dmesg_log disabled",
292+
"desc": "DmesgPlugin config with log_dmesg_data disabled",
293293
"global_args": {},
294-
"plugins": {"DmesgPlugin": {"collection_args": {"collect_dmesg_log": False}}},
294+
"plugins": {"DmesgPlugin": {"collection_args": {"log_dmesg_data": False}}},
295295
"result_collators": {},
296296
}
297297
config_file = tmp_path / "dmesg_no_log_config.json"
@@ -309,16 +309,16 @@ def test_dmesg_plugin_collect_dmesg_log_false(run_cli_command, tmp_path):
309309
dmesg_log_files = list(dmesg_plugin_dir.glob("dmesg*.log"))
310310
assert (
311311
len(dmesg_log_files) == 0
312-
), f"Found dmesg log files when collect_dmesg_log=False: {dmesg_log_files}"
312+
), f"Found dmesg log files when log_dmesg_data=False: {dmesg_log_files}"
313313

314314

315-
def test_dmesg_plugin_collect_dmesg_log_true(run_cli_command, tmp_path):
316-
"""Test DmesgPlugin with collect_dmesg_log=true writes dmesg.log."""
315+
def test_dmesg_plugin_log_dmesg_data_true(run_cli_command, tmp_path):
316+
"""Test DmesgPlugin with log_dmesg_data=true writes dmesg.log."""
317317
config = {
318318
"name": "DmesgWithLogConfig",
319-
"desc": "DmesgPlugin config with collect_dmesg_log enabled",
319+
"desc": "DmesgPlugin config with log_dmesg_data enabled",
320320
"global_args": {},
321-
"plugins": {"DmesgPlugin": {"collection_args": {"collect_dmesg_log": True}}},
321+
"plugins": {"DmesgPlugin": {"collection_args": {"log_dmesg_data": True}}},
322322
"result_collators": {},
323323
}
324324
config_file = tmp_path / "dmesg_with_log_config.json"
@@ -333,4 +333,4 @@ def test_dmesg_plugin_collect_dmesg_log_true(run_cli_command, tmp_path):
333333
dmesg_plugin_dir = Path(log_path) / "dmesg_plugin" / "dmesg_collector"
334334
if dmesg_plugin_dir.exists():
335335
dmesg_log_files = list(dmesg_plugin_dir.glob("dmesg*.log"))
336-
assert len(dmesg_log_files) > 0, "Expected dmesg.log file when collect_dmesg_log=True"
336+
assert len(dmesg_log_files) > 0, "Expected dmesg.log file when log_dmesg_data=True"

test/unit/plugin/test_dmesg_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ def test_collect_data_with_args(conn_mock, system_info):
295295
connection=conn_mock,
296296
)
297297

298-
args = DmesgCollectorArgs(collect_dmesg_log=False)
298+
args = DmesgCollectorArgs(log_dmesg_data=False)
299299
res, data = collector.collect_data(args=args)
300300

301301
assert res.status == ExecutionStatus.OK

0 commit comments

Comments
 (0)