From 0b84ca96f4d182cf263978a86f1050e6f4882d1c Mon Sep 17 00:00:00 2001 From: xin liang Date: Wed, 22 Jan 2025 17:23:13 +0800 Subject: [PATCH] Dev: unittests: Adjust unit test for previous commit --- test/unittests/test_report_collect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unittests/test_report_collect.py b/test/unittests/test_report_collect.py index 3575f8208..494b30cd8 100644 --- a/test/unittests/test_report_collect.py +++ b/test/unittests/test_report_collect.py @@ -550,7 +550,9 @@ def test_collect_qdevice_info(self, mock_service, mock_quorum, mock_qdevice, moc @mock.patch("crmsh.report.collect.lsof_cluster_fs_device") @mock.patch("crmsh.report.collect.dump_D_process") @mock.patch("crmsh.report.collect.ShellUtils") - def test_collect_cluster_fs_info(self, mock_run, mock_dump, mock_lsof, mock_cluster, mock_debug, mock_real_path, mock_str2file, mock_error): + @mock.patch("shutil.which") + def test_collect_cluster_fs_info(self, mock_which, mock_run, mock_dump, mock_lsof, mock_cluster, mock_debug, mock_real_path, mock_str2file, mock_error): + mock_which.return_value = True mock_run_inst = mock.Mock() mock_run.return_value = mock_run_inst mock_run_inst.get_stdout_stderr.side_effect = [