diff --git a/deps/wazuh_testing/setup.py b/deps/wazuh_testing/setup.py index fa6392d8f2..acfb37c4f3 100644 --- a/deps/wazuh_testing/setup.py +++ b/deps/wazuh_testing/setup.py @@ -24,7 +24,8 @@ 'data/winevt.py', 'data/sslmanager.key', 'data/sslmanager.cert', - 'tools/macos_log/log_generator.m' + 'tools/macos_log/log_generator.m', + 'tools/macos_log/macos_utils.py' ] }, entry_points={ diff --git a/tests/integration/test_logcollector/test_macos/macos_utils.py b/deps/wazuh_testing/wazuh_testing/tools/macos_log/macos_utils.py similarity index 86% rename from tests/integration/test_logcollector/test_macos/macos_utils.py rename to deps/wazuh_testing/wazuh_testing/tools/macos_log/macos_utils.py index ac48364f86..0c788b4c9d 100644 --- a/tests/integration/test_logcollector/test_macos/macos_utils.py +++ b/deps/wazuh_testing/wazuh_testing/tools/macos_log/macos_utils.py @@ -3,12 +3,15 @@ # This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 def compose_settings(__type="", __level="", __predicate="", __is_sierra=False): + """ + This function replicates how the command 'log' will be called from the Wazuh agent given the query parameters + """ settings_str = "" if (__is_sierra): settings_str = "/usr/bin/script -q /dev/null " - + settings_str = settings_str + "/usr/bin/log stream --style syslog " if (__type): diff --git a/tests/integration/test_logcollector/test_macos/test_macos_file_status_basic.py b/tests/integration/test_logcollector/test_macos/test_macos_file_status_basic.py index 2d2f2066e0..a33d5bb4e2 100644 --- a/tests/integration/test_logcollector/test_macos/test_macos_file_status_basic.py +++ b/tests/integration/test_logcollector/test_macos/test_macos_file_status_basic.py @@ -3,10 +3,10 @@ # This program is free software; you can redistribute it and/or modify it under the terms of GPLv2 import os -import pytest import re -# import macos_utils +import pytest import wazuh_testing.logcollector as logcollector +import wazuh_testing.tools.macos_log.macos_utils as macos_utils from wazuh_testing.tools.configuration import load_wazuh_configurations from wazuh_testing.remote import check_agent_received_message