Skip to content

Commit 6e0529d

Browse files
authored
Ignore more serverless index templates (#95)
1 parent 4863795 commit 6e0529d

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

test_elasticsearch_serverless/utils.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ def wipe_indices(client):
9595

9696

9797
def wipe_xpack_templates(client):
98-
# Delete component templates, need to retry because sometimes
99-
# indices aren't cleaned up in time before we issue the delete.
10098
templates = client.cluster.get_component_template()["component_templates"]
10199
templates_to_delete = [
102100
template["name"]
@@ -123,19 +121,17 @@ def wipe_transforms(client: Elasticsearch, timeout=30):
123121

124122

125123
def is_xpack_template(name):
126-
if name.startswith(".alerts-"):
127-
return True
128-
elif name.startswith(".kibana-data-quality-dashboard-"):
129-
return True
130-
elif name.startswith(".kibana-elastic-ai-assistant-component-template-"):
124+
if name.startswith("."):
131125
return True
132126
elif name.startswith("behavioral_analytics-events"):
133127
return True
134128
elif name.startswith("elastic-connectors-"):
135129
return True
136130
elif name.startswith("entities_v1_"):
137131
return True
138-
if name in {
132+
elif "fleet_server" in name:
133+
return True
134+
return name in {
139135
"apm-10d@lifecycle",
140136
"apm-180d@lifecycle",
141137
"apm-390d@lifecycle",
@@ -180,9 +176,7 @@ def is_xpack_template(name):
180176
"ecs-tsdb@mappings",
181177
"logs-otel@mappings",
182178
"otel@mappings",
183-
}:
184-
return True
185-
return False
179+
}
186180

187181

188182
def es_api_key() -> str:

0 commit comments

Comments
 (0)