Skip to content

Commit

Permalink
Fix tests without destructive_requires_names=false (#2573)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored May 29, 2024
1 parent c554d57 commit e91092e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test_elasticsearch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,13 @@ def wipe_data_streams(client):


def wipe_indices(client):
client.options(ignore_status=404).indices.delete(
index="*,-.ds-ilm-history-*",
expand_wildcards="all",
)
indices = client.cat.indices().strip().splitlines()
if len(indices) > 0:
index_names = [i.split(" ")[2] for i in indices]
client.options(ignore_status=404).indices.delete(
index=",".join(index_names),
expand_wildcards="all",
)


def wipe_searchable_snapshot_indices(client):
Expand Down

0 comments on commit e91092e

Please sign in to comment.