@@ -85,7 +85,11 @@ function build (opts = {}) {
85
85
)
86
86
87
87
// remove 'x_pack_rest_user', used in some xpack test
88
- await client . security . deleteUser ( { username : 'x_pack_rest_user' } , { ignore : [ 404 ] } )
88
+ try {
89
+ await client . security . deleteUser ( { username : 'x_pack_rest_user' } , { ignore : [ 404 ] } )
90
+ } catch {
91
+ // do nothing
92
+ }
89
93
90
94
const searchableSnapshotIndices = await client . cluster . state ( {
91
95
metric : 'metadata' ,
@@ -137,7 +141,11 @@ function build (opts = {}) {
137
141
const body = await client . cluster . getComponentTemplate ( )
138
142
const components = body . component_templates . filter ( c => ! isXPackTemplate ( c . name ) ) . map ( c => c . name )
139
143
if ( components . length > 0 ) {
140
- await client . cluster . deleteComponentTemplate ( { name : components . join ( ',' ) } , { ignore : [ 404 ] } )
144
+ try {
145
+ await client . cluster . deleteComponentTemplate ( { name : components . join ( ',' ) } , { ignore : [ 404 ] } )
146
+ } catch {
147
+ // do nothing
148
+ }
141
149
}
142
150
143
151
// Remove any cluster setting
@@ -157,9 +165,25 @@ function build (opts = {}) {
157
165
if ( isXPack ) {
158
166
// delete ilm policies
159
167
const preserveIlmPolicies = [
160
- 'ilm-history-ilm-policy' , 'slm-history-ilm-policy' ,
161
- 'watch-history-ilm-policy' , 'ml-size-based-ilm-policy' ,
162
- 'logs' , 'metrics'
168
+ "ilm-history-ilm-policy" ,
169
+ "slm-history-ilm-policy" ,
170
+ "watch-history-ilm-policy" ,
171
+ "watch-history-ilm-policy-16" ,
172
+ "ml-size-based-ilm-policy" ,
173
+ "logs" ,
174
+ "metrics" ,
175
+ "synthetics" ,
176
+ "7-days-default" ,
177
+ "30-days-default" ,
178
+ "90-days-default" ,
179
+ "180-days-default" ,
180
+ "365-days-default" ,
181
+ ".fleet-actions-results-ilm-policy" ,
182
+ ".fleet-file-data-ilm-policy" ,
183
+ ".fleet-files-ilm-policy" ,
184
+ ".deprecation-indexing-ilm-policy" ,
185
+ ".monitoring-8-ilm-policy" ,
186
+ "behavioral_analytics-events-default_policy" ,
163
187
]
164
188
const policies = await client . ilm . getLifecycle ( )
165
189
for ( const policy in policies ) {
@@ -257,7 +281,7 @@ function build (opts = {}) {
257
281
* - cleanup
258
282
* @param {object } setup (null if not needed)
259
283
* @param {object } test
260
- * @oaram {object} teardown (null if not needed)
284
+ * @param {object } teardown (null if not needed)
261
285
* @returns {Promise }
262
286
*/
263
287
async function run ( setup , test , teardown , stats , junit ) {
0 commit comments