diff --git a/tests/integration/test_analysisd/test_queue_socket_properties/test_queue_socket_properties.py b/tests/integration/test_analysisd/test_queue_socket_properties/test_queue_socket_properties.py index a25283c054..de657c398f 100644 --- a/tests/integration/test_analysisd/test_queue_socket_properties/test_queue_socket_properties.py +++ b/tests/integration/test_analysisd/test_queue_socket_properties/test_queue_socket_properties.py @@ -54,7 +54,7 @@ import pytest import subprocess -from wazuh_testing.tools import WAZUH_PATH +from wazuh_testing.tools import WAZUH_PATH, ANALYSISD_QUEUE_SOCKET_PATH, ANALYSISD_DAEMON from wazuh_testing.tools.services import control_service, check_daemon_status # Marks @@ -63,8 +63,7 @@ # Variables -ANALYSISD_SOCKET = os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue') -analysisd_path = os.path.join(WAZUH_PATH, 'bin', 'wazuh-analysisd') +analysisd_path = os.path.join(WAZUH_PATH, 'bin', ANALYSISD_DAEMON) command_exec = f'{analysisd_path} -t' # Fixtures @@ -73,7 +72,7 @@ @pytest.fixture(scope="function") def socket_file_properties(): """Get the inode and modification time values of the 'queue' socket of 'wazuh-analysisd'""" - return os.stat(ANALYSISD_SOCKET).st_ino, os.path.getmtime(ANALYSISD_SOCKET) + return os.stat(ANALYSISD_QUEUE_SOCKET_PATH).st_ino, os.path.getmtime(ANALYSISD_QUEUE_SOCKET_PATH) @pytest.fixture(scope="function") @@ -114,8 +113,8 @@ def test_queue_socket_properties(socket_file_properties, run_analysisd_test_conf to run the daemon configuration test of 'wazuh-analysisd'. expected_output: - - f"The inode value for the socket {ANALYSISD_SOCKET} has changed" - - f"The modification time property for the socket {ANALYSISD_SOCKET} has changed" + - f"The inode value for the socket {ANALYSISD_QUEUE_SOCKET_PATH} has changed" + - f"The modification time property for the socket {ANALYSISD_QUEUE_SOCKET_PATH} has changed" tags: - errors ''' @@ -126,8 +125,8 @@ def test_queue_socket_properties(socket_file_properties, run_analysisd_test_conf run_analysisd_test_config - assert current_inode_file == os.stat(ANALYSISD_SOCKET).st_ino, \ - f"The inode value for the socket {ANALYSISD_SOCKET} has changed" + assert current_inode_file == os.stat(ANALYSISD_QUEUE_SOCKET_PATH).st_ino, \ + f"The inode value for the socket {ANALYSISD_QUEUE_SOCKET_PATH} has changed" - assert current_status_time == os.path.getmtime(ANALYSISD_SOCKET), \ - f"The modification time property value for the socket {ANALYSISD_SOCKET} has changed" + assert current_status_time == os.path.getmtime(ANALYSISD_QUEUE_SOCKET_PATH), \ + f"The modification time property value for the socket {ANALYSISD_QUEUE_SOCKET_PATH} has changed"