-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path20_reindex.yml
56 lines (50 loc) · 1.25 KB
/
20_reindex.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
requires:
stack: true
serverless: false
---
teardown:
- do:
indices.delete_data_stream:
name: test-reindex-datastream
---
"Test migrate_reindex, get_migrate_reindex_status, cancel_migrate_reindex":
- do:
indices.put_index_template:
name: test-reindex-template
body:
index_patterns: [test-reindex-datastream*]
template:
mappings:
properties:
'@timestamp':
type: date
'foo':
type: keyword
data_stream: {}
- do:
indices.create_data_stream:
name: test-reindex-datastream
- is_true: acknowledged
- do:
indices.migrate_reindex:
body: |
{
"mode": "upgrade",
"source": {
"index": "test-reindex-datastream"
}
}
- is_true: acknowledged
- do:
indices.get_migrate_reindex_status:
index: "test-reindex-datastream"
- match: { complete: true }
- do:
indices.cancel_migrate_reindex:
index: "test-reindex-datastream"
- match: { acknowledged: true }
- do:
catch: /resource_not_found_exception/
indices.cancel_migrate_reindex:
index: "test-reindex-datastream"