Skip to content

Commit

Permalink
docker: allows elasticsearch8 tests to delete with wildcards
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
Adrian Cole committed Dec 29, 2023
1 parent ee5e762 commit 6961ef8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ xpack.security.enabled: false
xpack.ml.enabled: false
cluster.initial_master_nodes:
- zipkin-elasticsearch
# This is a test image, so we are not afraid to delete all indices. Avoids:
# Wildcard expressions or all indices are not allowed
action.destructive_requires_name: false
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ public void clear() throws IOException {
Set<String> toClear = new LinkedHashSet<>();
toClear.add(indexNameFormatter().formatType(TYPE_SPAN));
toClear.add(indexNameFormatter().formatType(TYPE_DEPENDENCY));
// Note: Elasticsearch 8.x requires this config to clear with wildcards:
// action.destructive_requires_name: false
for (String index : toClear) clear(index);
}

Expand Down

0 comments on commit 6961ef8

Please sign in to comment.