diff --git a/test_elasticsearch_serverless/utils.py b/test_elasticsearch_serverless/utils.py index 49f7ba9..4449d50 100644 --- a/test_elasticsearch_serverless/utils.py +++ b/test_elasticsearch_serverless/utils.py @@ -95,8 +95,6 @@ def wipe_indices(client): def wipe_xpack_templates(client): - # Delete component templates, need to retry because sometimes - # indices aren't cleaned up in time before we issue the delete. templates = client.cluster.get_component_template()["component_templates"] templates_to_delete = [ template["name"] @@ -123,11 +121,7 @@ def wipe_transforms(client: Elasticsearch, timeout=30): def is_xpack_template(name): - if name.startswith(".alerts-"): - return True - elif name.startswith(".kibana-data-quality-dashboard-"): - return True - elif name.startswith(".kibana-elastic-ai-assistant-component-template-"): + if name.startswith("."): return True elif name.startswith("behavioral_analytics-events"): return True @@ -135,7 +129,9 @@ def is_xpack_template(name): return True elif name.startswith("entities_v1_"): return True - if name in { + elif "fleet_server" in name: + return True + return name in { "apm-10d@lifecycle", "apm-180d@lifecycle", "apm-390d@lifecycle", @@ -180,9 +176,7 @@ def is_xpack_template(name): "ecs-tsdb@mappings", "logs-otel@mappings", "otel@mappings", - }: - return True - return False + } def es_api_key() -> str: