From a3a88f06e8e87619217986677d4ba2ee85849dcb Mon Sep 17 00:00:00 2001 From: Julia Date: Mon, 22 Aug 2022 12:17:25 +0200 Subject: [PATCH] fix(#3165): get manager ip to delete index --- deps/wazuh_testing/wazuh_testing/end_to_end/__init__.py | 2 +- tests/end_to_end/conftest.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/end_to_end/__init__.py b/deps/wazuh_testing/wazuh_testing/end_to_end/__init__.py index 2c53eb37a7..db1c7b2814 100644 --- a/deps/wazuh_testing/wazuh_testing/end_to_end/__init__.py +++ b/deps/wazuh_testing/wazuh_testing/end_to_end/__init__.py @@ -36,7 +36,7 @@ def get_alert_indexer_api(query, credentials, ip_address, index='wazuh-alerts-4. return response -def delete_index_api(credentials, ip_address='wazuh-manager', index='wazuh-alerts-4.x-*'): +def delete_index_api(credentials, ip_address, index='wazuh-alerts-4.x-*'): """Delete indices from wazuh-indexer using its API. Make a request to the wazuh-indexer API to delete indices that match a given name. diff --git a/tests/end_to_end/conftest.py b/tests/end_to_end/conftest.py index 604fb2f95e..bd236d3019 100644 --- a/tests/end_to_end/conftest.py +++ b/tests/end_to_end/conftest.py @@ -14,7 +14,7 @@ @pytest.fixture(scope='function') -def clean_alerts_index(get_dashboard_credentials): +def clean_alerts_index(get_dashboard_credentials, get_manager_ip): """Remove the temporary file that contains the alerts and delete indices using the API. Args: @@ -22,7 +22,7 @@ def clean_alerts_index(get_dashboard_credentials): """ yield remove_file(alerts_json) - e2e.delete_index_api(credentials=get_dashboard_credentials) + e2e.delete_index_api(credentials=get_dashboard_credentials, ip_address=get_manager_ip) @pytest.fixture(scope='module')