Skip to content

Commit e91092e

Browse files
authored
Fix tests without destructive_requires_names=false (#2573)
1 parent c554d57 commit e91092e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Diff for: test_elasticsearch/utils.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,13 @@ def wipe_data_streams(client):
215215

216216

217217
def wipe_indices(client):
218-
client.options(ignore_status=404).indices.delete(
219-
index="*,-.ds-ilm-history-*",
220-
expand_wildcards="all",
221-
)
218+
indices = client.cat.indices().strip().splitlines()
219+
if len(indices) > 0:
220+
index_names = [i.split(" ")[2] for i in indices]
221+
client.options(ignore_status=404).indices.delete(
222+
index=",".join(index_names),
223+
expand_wildcards="all",
224+
)
222225

223226

224227
def wipe_searchable_snapshot_indices(client):

0 commit comments

Comments
 (0)