Skip to content
Merged

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,42 @@ teardown:
- match: { failure_store: used }
- match: { _index: '/\.fs-default-fs-matching-(\d{4}\.\d{2}\.\d{2}-)?\d{6}/' }

# Assert that no data stream options are configured
- do:
indices.get_data_stream_options:
name: "default-fs-matching"
- length: { data_streams: 1 }
- match: { data_streams.0.name: default-fs-matching }
- is_false: data_streams.0.options

# Assert that failure store is effectively enabled
- do:
indices.get_data_stream:
name: "default-fs-matching"
- match: { data_streams.0.name: default-fs-matching }
- match: { data_streams.0.failure_store.enabled: true }

---
"Redirect ingest failure into pre-existing data stream to failure store when enabled by setting":
- do:
indices.create_data_stream:
name: default-fs-matching

# Assert that no data stream options are configured
- do:
indices.get_data_stream_options:
name: "default-fs-matching"
- length: { data_streams: 1 }
- match: { data_streams.0.name: default-fs-matching }
- is_false: data_streams.0.options

# Assert that failure store is effectively enabled
- do:
indices.get_data_stream:
name: "default-fs-matching"
- match: { data_streams.0.name: default-fs-matching }
- match: { data_streams.0.failure_store.enabled: true }

- do:
index:
index: default-fs-matching
Expand All @@ -136,6 +166,7 @@ teardown:

---
"Do not redirect ingest failure when auto-creating data stream to failure store when enabled by setting but disabled in template":

- do:
index:
index: disabled-fs-matching
Expand All @@ -146,12 +177,46 @@ teardown:
foo: bar
catch: '/pipeline go boom/'

# Now create the data stream to ensure it has the expected configuration
- do:
indices.create_data_stream:
name: default-fs-matching

# Assert that failure_store is disabled
- do:
indices.get_data_stream_options:
name: "disabled-fs-matching"
- length: { data_streams: 1 }
- match: { data_streams.0.name: disabled-fs-matching }
- is_false: data_streams.0.options.failure_store.enabled

# Assert that failure store is effectively enabled
- do:
indices.get_data_stream:
name: "disabled-fs-matching"
- match: { data_streams.0.name: disabled-fs-matching }
- match: { data_streams.0.failure_store.enabled: false }

---
"Do not redirect ingest failure into pre-existing data stream to failure store when enabled by setting but disabled in template":
- do:
indices.create_data_stream:
name: disabled-fs-matching

# Assert that failure_store is disabled
- do:
indices.get_data_stream_options:
name: "disabled-fs-matching"
- length: { data_streams: 1 }
- match: { data_streams.0.name: disabled-fs-matching }
- is_false: data_streams.0.options.failure_store.enabled

# Assert that failure store is effectively enabled
- do:
indices.get_data_stream:
name: "disabled-fs-matching"
- match: { data_streams.0.name: disabled-fs-matching }
- match: { data_streams.0.failure_store.enabled: false }
- do:
index:
index: disabled-fs-matching
Expand Down Expand Up @@ -215,8 +280,3 @@ teardown:
'@timestamp': 'not a timestamp'
foo: bar
catch: '/failed to parse field/'

# See also DataStreamOptionsIT for tests of the interaction between the failure store cluster setting and using
# the /_data_stream/{name}/_options API to explicitly enable and disable the failure store. (At time of writing, these
# can only be done in a Java REST test case, not a YAML one, because the failure store is behind a feature gate and so
# the REST API spec has not been added.)
Loading