@@ -51,16 +51,20 @@ setup:
5151 body :
5252 index :
5353 number_of_shards : 2
54- lifecycle.name : my-new-policy
54+ lifecycle :
55+ name : my-new-policy
56+ prefer_ilm : true
5557 - match : { data_streams.0.name: my-data-stream-1 }
5658 - match : { data_streams.0.applied_to_data_stream: true }
5759 - match : { data_streams.0.index_settings_results.applied_to_data_stream_only: [index.number_of_shards]}
58- - match : { data_streams.0.index_settings_results.applied_to_data_stream_and_backing_indices: [index.lifecycle.name] }
60+ - length : { data_streams.0.index_settings_results.applied_to_data_stream_and_backing_indices: 2 }
5961 - match : { data_streams.0.settings.index.number_of_shards: "2" }
6062 - match : { data_streams.0.settings.index.lifecycle.name: "my-new-policy" }
63+ - match : { data_streams.0.settings.index.lifecycle.prefer_ilm: "true" }
6164 - match : { data_streams.0.effective_settings.index.number_of_shards: "2" }
6265 - match : { data_streams.0.effective_settings.index.number_of_replicas: "0" }
6366 - match : { data_streams.0.effective_settings.index.lifecycle.name: "my-new-policy" }
67+ - match : { data_streams.0.effective_settings.index.lifecycle.prefer_ilm: "true" }
6468
6569 - do :
6670 indices.rollover :
@@ -79,13 +83,15 @@ setup:
7983 - match : { data_streams.0.effective_settings.index.number_of_shards: "2" }
8084 - match : { data_streams.0.effective_settings.index.number_of_replicas: "0" }
8185 - match : { data_streams.0.effective_settings.index.lifecycle.name: "my-new-policy" }
86+ - match : { data_streams.0.effective_settings.index.lifecycle.prefer_ilm: "true" }
8287
8388 - do :
8489 indices.get_data_stream :
8590 name : my-data-stream-1
8691 - match : { data_streams.0.name: my-data-stream-1 }
8792 - match : { data_streams.0.settings.index.number_of_shards: "2" }
8893 - match : { data_streams.0.settings.index.lifecycle.name: "my-new-policy" }
94+ - match : { data_streams.0.settings.index.lifecycle.prefer_ilm: "true" }
8995 - match : { data_streams.0.effective_settings: null }
9096
9197 - do :
@@ -101,6 +107,7 @@ setup:
101107 - match : { .$idx0name.settings.index.lifecycle.name: "my-new-policy" }
102108 - match : { .$idx1name.settings.index.number_of_shards: "2" }
103109 - match : { .$idx1name.settings.index.lifecycle.name: "my-new-policy" }
110+ - match : { .$idx1name.settings.index.lifecycle.prefer_ilm: "true" }
104111
105112---
106113" Test multiple data streams " :
0 commit comments