@@ -166,17 +166,6 @@ class << self
166
166
'metrics'
167
167
] . freeze
168
168
169
- XPACK_TEMPLATES = [
170
- '.watches' , 'logstash-index-template' , '.logstash-management' ,
171
- 'security_audit_log' , '.slm-history' , '.async-search' ,
172
- 'saml-service-provider' , 'ilm-history' , 'logs' , 'logs-settings' ,
173
- 'logs-mappings' , 'metrics' , 'metrics-settings' , 'metrics-mappings' ,
174
- 'synthetics' , 'synthetics-settings' , 'synthetics-mappings' ,
175
- '.snapshot-blob-cache' , '.deprecation-indexing-template' ,
176
- '.deprecation-indexing-mappings' , '.deprecation-indexing-settings' ,
177
- 'security-index-template' , 'data-streams-mappings'
178
- ] . freeze
179
-
180
169
# Wipe Cluster, based on PHP's implementation of ESRestTestCase.java:wipeCluster()
181
170
# https://github.com/elastic/elasticsearch-php/blob/7.10/tests/Elasticsearch/Tests/Utility.php#L97
182
171
def wipe_cluster ( client )
@@ -187,7 +176,7 @@ def wipe_cluster(client)
187
176
wipe_searchable_snapshot_indices ( client )
188
177
end
189
178
clear_snapshots_and_repositories ( client )
190
- clear_datastreams ( client ) if xpack?
179
+ clear_datastreams ( client )
191
180
clear_indices ( client )
192
181
if xpack?
193
182
clear_templates_xpack ( client )
@@ -304,8 +293,20 @@ def clear_templates_xpack(client)
304
293
end
305
294
end
306
295
296
+ XPACK_TEMPLATES = [
297
+ '.watches' , 'logstash-index-template' , '.logstash-management' ,
298
+ 'security_audit_log' , '.slm-history' , '.async-search' ,
299
+ 'saml-service-provider' , 'ilm-history' , 'logs' , 'logs-settings' ,
300
+ 'logs-mappings' , 'metrics' , 'metrics-settings' , 'metrics-mappings' ,
301
+ 'synthetics' , 'synthetics-settings' , 'synthetics-mappings' ,
302
+ '.snapshot-blob-cache' , '.deprecation-indexing-template' ,
303
+ '.deprecation-indexing-mappings' , '.deprecation-indexing-settings' ,
304
+ 'security-index-template' , 'data-streams-mappings'
305
+ ] . freeze
306
+
307
307
def xpack_template? ( template )
308
- xpack_prefixes = [ '.monitoring' , '.watch' , '.triggered-watches' , '.data-frame' , '.ml-' , '.transform' , 'data-streams-mappings' , '.deprecation-' ] . freeze
308
+ xpack_prefixes = [
309
+ '.monitoring' , '.watch' , '.triggered-watches' , '.data-frame' , '.ml-' , '.transform' , 'data-streams-mappings' ] . freeze
309
310
xpack_prefixes . map { |a | return true if a . include? template }
310
311
311
312
XPACK_TEMPLATES . include? template
0 commit comments