@@ -73,6 +73,11 @@ teardown:
7373 name : default-fs-matching
7474 ignore : 404
7575
76+ - do :
77+ indices.delete_data_stream :
78+ name : default-fs-no-match
79+ ignore : 404
80+
7681 - do :
7782 indices.delete_data_stream :
7883 name : disabled-fs-matching
@@ -180,17 +185,17 @@ teardown:
180185 # Now create the data stream to ensure it has the expected configuration
181186 - do :
182187 indices.create_data_stream :
183- name : default -fs-matching
188+ name : disabled -fs-matching
184189
185190 # Assert that failure_store is disabled
186191 - do :
187192 indices.get_data_stream_options :
188193 name : " disabled-fs-matching"
189194 - length : { data_streams: 1 }
190195 - match : { data_streams.0.name: disabled-fs-matching }
191- - is_false : data_streams.0.options. failure_store.enabled
196+ - match : { data_streams.0.failure_store.enabled: false }
192197
193- # Assert that failure store is effectively enabled
198+ # Assert that failure store is effectively disabled
194199 - do :
195200 indices.get_data_stream :
196201 name : " disabled-fs-matching"
@@ -209,9 +214,9 @@ teardown:
209214 name : " disabled-fs-matching"
210215 - length : { data_streams: 1 }
211216 - match : { data_streams.0.name: disabled-fs-matching }
212- - is_false : data_streams.0.options. failure_store.enabled
217+ - match : { data_streams.0.failure_store.enabled: false }
213218
214- # Assert that failure store is effectively enabled
219+ # Assert that failure store is effectively disabled
215220 - do :
216221 indices.get_data_stream :
217222 name : " disabled-fs-matching"
@@ -227,6 +232,69 @@ teardown:
227232 foo : bar
228233 catch : ' /pipeline go boom/'
229234
235+ ---
236+ " Do not redirect ingest failure when auto-creating data stream to failure store when it doesn't match the setting " :
237+
238+ - do :
239+ index :
240+ index : default-fs-no-match
241+ refresh : true
242+ pipeline : ' failing_pipeline'
243+ body :
244+ ' @timestamp ' : ' 2020-12-12'
245+ foo : bar
246+ catch : ' /pipeline go boom/'
247+
248+ # Now create the data stream to ensure it has the expected configuration
249+ - do :
250+ indices.create_data_stream :
251+ name : default-fs-no-match
252+
253+ # Assert that failure_store is not configured
254+ - do :
255+ indices.get_data_stream_options :
256+ name : " default-fs-no-match"
257+ - length : { data_streams: 1 }
258+ - match : { data_streams.0.name: default-fs-no-match }
259+ - is_false : data_streams.0.options.failure_store
260+
261+ # Assert that failure store is effectively disabled
262+ - do :
263+ indices.get_data_stream :
264+ name : " default-fs-no-match"
265+ - match : { data_streams.0.name: default-fs-no-match }
266+ - match : { data_streams.0.failure_store.enabled: false }
267+
268+ ---
269+ " Do not redirect ingest failure into pre-existing data stream to failure store when it doesn't match the setting " :
270+ - do :
271+ indices.create_data_stream :
272+ name : default-fs-no-match
273+
274+ # Assert that failure_store is not configured
275+ - do :
276+ indices.get_data_stream_options :
277+ name : " default-fs-no-match"
278+ - length : { data_streams: 1 }
279+ - match : { data_streams.0.name: default-fs-no-match }
280+ - is_false : data_streams.0.options.failure_store
281+
282+ # Assert that failure store is effectively disabled
283+ - do :
284+ indices.get_data_stream :
285+ name : " default-fs-no-match"
286+ - match : { data_streams.0.name: default-fs-no-match }
287+ - match : { data_streams.0.failure_store.enabled: false }
288+ - do :
289+ index :
290+ index : default-fs-no-match
291+ refresh : true
292+ pipeline : ' failing_pipeline'
293+ body :
294+ ' @timestamp ' : ' 2020-12-12'
295+ foo : bar
296+ catch : ' /pipeline go boom/'
297+
230298---
231299" Redirect mapping failure when auto-creating data stream to failure store when enabled by setting " :
232300 - do :
@@ -280,3 +348,29 @@ teardown:
280348 ' @timestamp ' : ' not a timestamp'
281349 foo : bar
282350 catch : ' /failed to parse field/'
351+
352+ ---
353+ " Do not redirect mapping failure when auto-creating data stream to failure store when it doesn't match the setting " :
354+ - do :
355+ index :
356+ index : default-fs-no-match
357+ refresh : true
358+ body :
359+ ' @timestamp ' : ' not a timestamp'
360+ foo : bar
361+ catch : ' /failed to parse field/'
362+
363+ ---
364+ " Do not redirect mapping failure into pre-existing data stream to failure store when it doesn't match the setting " :
365+ - do :
366+ indices.create_data_stream :
367+ name : default-fs-no-match
368+
369+ - do :
370+ index :
371+ index : default-fs-no-match
372+ refresh : true
373+ body :
374+ ' @timestamp ' : ' not a timestamp'
375+ foo : bar
376+ catch : ' /failed to parse field/'
0 commit comments