From a13a322a53739e4257cdfbfa32b8a1bce69f47b6 Mon Sep 17 00:00:00 2001 From: Alba Hita <93577878+ahitacat@users.noreply.github.com> Date: Thu, 27 Oct 2022 04:59:19 +0200 Subject: [PATCH] Avoid test to write in disk if machine-id is not found (#3543) Signed-off-by: ahitacat (cherry picked from commit 468c6b4f4fc191580e8114be3a8f60cb82cd7f2d) --- insights/tests/client/apps/test_malware_detection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/insights/tests/client/apps/test_malware_detection.py b/insights/tests/client/apps/test_malware_detection.py index 6731fd97e7..d52b74d93f 100644 --- a/insights/tests/client/apps/test_malware_detection.py +++ b/insights/tests/client/apps/test_malware_detection.py @@ -123,6 +123,7 @@ def test_default_options(self): @patch(GET_RULES_TARGET, return_value=TEST_RULE_FILE) @patch(FIND_YARA_TARGET, return_value=YARA) @patch(LOGGER_TARGET) + @patch('insights.client.utilities.write_to_disk', Mock()) def test_running_default_options(self, log_mock, yara, rules, cmd, create_test_files): # Try running malware-detection with the default options # With the default options, test_scan is true, so some of the option values will be changed for that and