@@ -9,6 +9,9 @@ teardown:
9
9
_internal.delete_desired_nodes : {}
10
10
---
11
11
" Test update desired nodes " :
12
+ - skip :
13
+ reason : " contains is a newly added assertion"
14
+ features : contains
12
15
- do :
13
16
cluster.state : {}
14
17
@@ -49,15 +52,17 @@ teardown:
49
52
50
53
- do :
51
54
_internal.get_desired_nodes : {}
52
- - match :
53
- $body :
54
- history_id : " test"
55
- version : 2
56
- nodes :
57
- - { settings: { node: { name: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
58
- - { settings: { node: { name: "instance-000188" } }, processors: 16, memory: "128gb", storage: "1tb", node_version: $es_version }
55
+
56
+ - match : { history_id: "test" }
57
+ - match : { version: 2 }
58
+ - length : { nodes: 2 }
59
+ - contains : { nodes: { settings: { node: { name: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
60
+ - contains : { nodes: { settings: { node: { name: "instance-000188" } }, processors: 16, memory: "128gb", storage: "1tb", node_version: $es_version } }
59
61
---
60
62
" Test update move to a new history id " :
63
+ - skip :
64
+ reason : " contains is a newly added assertion"
65
+ features : contains
61
66
- do :
62
67
cluster.state : {}
63
68
@@ -97,13 +102,11 @@ teardown:
97
102
98
103
- do :
99
104
_internal.get_desired_nodes : {}
100
- - match :
101
- $body :
102
- history_id : " new_history"
103
- version : 1
104
- nodes :
105
- - { settings: { node: { external_id: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
106
- - { settings: { node: { external_id: "instance-000188" } }, processors: 16, memory: "128gb", storage: "1tb", node_version: $es_version }
105
+ - match : { history_id: "new_history" }
106
+ - match : { version: 1 }
107
+ - length : { nodes: 2 }
108
+ - contains : { nodes: { settings: { node: { external_id: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
109
+ - contains : { nodes: { settings: { node: { external_id: "instance-000188" } }, processors: 16, memory: "128gb", storage: "1tb", node_version: $es_version } }
107
110
---
108
111
" Test delete desired nodes " :
109
112
- do :
@@ -142,6 +145,9 @@ teardown:
142
145
- match : { status: 404 }
143
146
---
144
147
" Test update desired nodes is idempotent " :
148
+ - skip :
149
+ reason : " contains is a newly added assertion"
150
+ features : contains
145
151
- do :
146
152
cluster.state : {}
147
153
@@ -158,16 +164,51 @@ teardown:
158
164
body :
159
165
nodes :
160
166
- { settings: { "node.external_id": "instance-000187" }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
167
+ - { settings: { "node.external_id": "instance-000188" }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
161
168
- match : { replaced_existing_history_id: false }
162
169
163
170
- do :
164
171
_internal.get_desired_nodes : {}
165
- - match :
166
- $body :
172
+
173
+ - match : { history_id: "test" }
174
+ - match : { version: 1 }
175
+ - length : { nodes: 2 }
176
+ - contains : { nodes: { settings: { node: { external_id: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
177
+ - contains : { nodes: { settings: { node: { external_id: "instance-000188" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
178
+
179
+ - do :
180
+ _internal.update_desired_nodes :
167
181
history_id : " test"
168
182
version : 1
169
- nodes :
170
- - { settings: { node: { external_id: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
183
+ body :
184
+ nodes :
185
+ - { settings: { "node.external_id": "instance-000187" }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
186
+ - { settings: { "node.external_id": "instance-000188" }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
187
+
188
+ - match : { replaced_existing_history_id: false }
189
+
190
+ - do :
191
+ _internal.get_desired_nodes : {}
192
+
193
+ - match : { history_id: "test" }
194
+ - match : { version: 1 }
195
+ - length : { nodes: 2 }
196
+ - contains : { nodes: { settings: { node: { external_id: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
197
+ - contains : { nodes: { settings: { node: { external_id: "instance-000188" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
198
+ ---
199
+ " Test update desired nodes is idempotent with different order " :
200
+ - skip :
201
+ version : " - 8.2.99"
202
+ features : contains
203
+ reason : " Bug fixed in 8.3.0 and uses contains feature"
204
+ - do :
205
+ cluster.state : {}
206
+
207
+ - set : { master_node: master }
208
+
209
+ - do :
210
+ nodes.info : {}
211
+ - set : { nodes.$master.version: es_version }
171
212
172
213
- do :
173
214
_internal.update_desired_nodes :
@@ -176,16 +217,37 @@ teardown:
176
217
body :
177
218
nodes :
178
219
- { settings: { "node.external_id": "instance-000187" }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
220
+ - { settings: { "node.external_id": "instance-000188" }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
179
221
- match : { replaced_existing_history_id: false }
180
222
181
223
- do :
182
224
_internal.get_desired_nodes : {}
183
- - match :
184
- $body :
225
+
226
+ - match : { history_id: "test" }
227
+ - match : { version: 1 }
228
+ - length : { nodes: 2 }
229
+ - contains : { nodes: { settings: { node: { external_id: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
230
+ - contains : { nodes: { settings: { node: { external_id: "instance-000188" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
231
+
232
+ - do :
233
+ _internal.update_desired_nodes :
185
234
history_id : " test"
186
235
version : 1
187
- nodes :
188
- - { settings: { node: { external_id: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
236
+ body :
237
+ nodes :
238
+ - { settings: { "node.external_id": "instance-000188" }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
239
+ - { settings: { "node.external_id": "instance-000187" }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
240
+
241
+ - match : { replaced_existing_history_id: false }
242
+
243
+ - do :
244
+ _internal.get_desired_nodes : {}
245
+
246
+ - match : { history_id: "test" }
247
+ - match : { version: 1 }
248
+ - length : { nodes: 2 }
249
+ - contains : { nodes: { settings: { node: { external_id: "instance-000187" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
250
+ - contains : { nodes: { settings: { node: { external_id: "instance-000188" } }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version } }
189
251
---
190
252
" Test going backwards within the same history is forbidden " :
191
253
- do :
@@ -343,6 +405,9 @@ teardown:
343
405
- match : { replaced_existing_history_id: false }
344
406
---
345
407
" Test external_id or node.name is required " :
408
+ - skip :
409
+ version : " - 8.2.99"
410
+ reason : " Change error code in 8.3"
346
411
- do :
347
412
cluster.state : {}
348
413
@@ -361,11 +426,13 @@ teardown:
361
426
nodes :
362
427
- { settings: { }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
363
428
- match : { status: 400 }
364
- - match : { error.type: illegal_argument_exception }
365
- - match : { error.reason: "Nodes with ids [<missing>] in positions [0] contain invalid settings" }
366
- - match : { error.suppressed.0.reason: "[node.name] or [node.external_id] is missing or empty" }
429
+ - match : { error.type: x_content_parse_exception }
430
+ - match : { error.caused_by.caused_by.caused_by.reason: "[node.name] or [node.external_id] is missing or empty" }
367
431
---
368
432
" Test external_id must have content " :
433
+ - skip :
434
+ version : " - 8.2.99"
435
+ reason : " Change error code in 8.3"
369
436
- do :
370
437
cluster.state : {}
371
438
@@ -384,9 +451,8 @@ teardown:
384
451
nodes :
385
452
- { settings: { "node.external_id": " " }, processors: 8, memory: "64gb", storage: "128gb", node_version: $es_version }
386
453
- match : { status: 400 }
387
- - match : { error.type: illegal_argument_exception }
388
- - match : { error.reason: "Nodes with ids [<missing>] in positions [0] contain invalid settings" }
389
- - match : { error.suppressed.0.reason: "[node.name] or [node.external_id] is missing or empty" }
454
+ - match : { error.type: x_content_parse_exception }
455
+ - match : { error.caused_by.caused_by.caused_by.reason: "[node.name] or [node.external_id] is missing or empty" }
390
456
---
391
457
" Test duplicated external ids are not allowed " :
392
458
- do :
0 commit comments