@@ -51,16 +51,20 @@ setup:
51
51
body :
52
52
index :
53
53
number_of_shards : 2
54
- lifecycle.name : my-new-policy
54
+ lifecycle :
55
+ name : my-new-policy
56
+ prefer_ilm : true
55
57
- match : { data_streams.0.name: my-data-stream-1 }
56
58
- match : { data_streams.0.applied_to_data_stream: true }
57
59
- 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 }
59
61
- match : { data_streams.0.settings.index.number_of_shards: "2" }
60
62
- match : { data_streams.0.settings.index.lifecycle.name: "my-new-policy" }
63
+ - match : { data_streams.0.settings.index.lifecycle.prefer_ilm: "true" }
61
64
- match : { data_streams.0.effective_settings.index.number_of_shards: "2" }
62
65
- match : { data_streams.0.effective_settings.index.number_of_replicas: "0" }
63
66
- match : { data_streams.0.effective_settings.index.lifecycle.name: "my-new-policy" }
67
+ - match : { data_streams.0.effective_settings.index.lifecycle.prefer_ilm: "true" }
64
68
65
69
- do :
66
70
indices.rollover :
@@ -79,13 +83,15 @@ setup:
79
83
- match : { data_streams.0.effective_settings.index.number_of_shards: "2" }
80
84
- match : { data_streams.0.effective_settings.index.number_of_replicas: "0" }
81
85
- match : { data_streams.0.effective_settings.index.lifecycle.name: "my-new-policy" }
86
+ - match : { data_streams.0.effective_settings.index.lifecycle.prefer_ilm: "true" }
82
87
83
88
- do :
84
89
indices.get_data_stream :
85
90
name : my-data-stream-1
86
91
- match : { data_streams.0.name: my-data-stream-1 }
87
92
- match : { data_streams.0.settings.index.number_of_shards: "2" }
88
93
- match : { data_streams.0.settings.index.lifecycle.name: "my-new-policy" }
94
+ - match : { data_streams.0.settings.index.lifecycle.prefer_ilm: "true" }
89
95
- match : { data_streams.0.effective_settings: null }
90
96
91
97
- do :
@@ -101,6 +107,7 @@ setup:
101
107
- match : { .$idx0name.settings.index.lifecycle.name: "my-new-policy" }
102
108
- match : { .$idx1name.settings.index.number_of_shards: "2" }
103
109
- match : { .$idx1name.settings.index.lifecycle.name: "my-new-policy" }
110
+ - match : { .$idx1name.settings.index.lifecycle.prefer_ilm: "true" }
104
111
105
112
---
106
113
" Test multiple data streams " :
0 commit comments