Skip to content

Commit

Permalink
fix(#3165): get manager ip to delete index
Browse files Browse the repository at this point in the history
  • Loading branch information
juliamagan committed Aug 22, 2022
1 parent 22fd49f commit a3a88f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deps/wazuh_testing/wazuh_testing/end_to_end/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tests/end_to_end/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@


@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:
credentials (dict): wazuh-indexer 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')
Expand Down

0 comments on commit a3a88f0

Please sign in to comment.