-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshrink.yml
54 lines (54 loc) · 1.17 KB
/
shrink.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
---
requires:
serverless: false
stack: true
---
setup:
- do:
indices.create:
index: shrink_source
body:
settings:
# ensure everything is allocated on the same data node
index.number_of_shards: 2
index.number_of_replicas: 0
- do:
index:
index: "shrink_source"
id: "1"
body: { "foo": "hello world" }
# make it read-only
- do:
indices.put_settings:
index: "shrink_source"
body:
index.blocks.write: true
index.number_of_replicas: 0
---
teardown:
- do:
indices.delete:
index: "shrink_source"
ignore: 404
- do:
indices.delete:
index: "shrink_target"
ignore: 404
---
'indices.shrink':
- do:
indices.shrink:
index: "shrink_source"
target: "shrink_target"
wait_for_active_shards: 1
master_timeout: 10s
body:
settings:
index.number_of_replicas: 0
- do:
get:
index: shrink_target
id: "1"
- match: { _index: shrink_target }
- match: { _id: "1" }
- match: { _source: { foo: "hello world" } }