-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimulate_template.yml
53 lines (50 loc) · 1.2 KB
/
simulate_template.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
---
requires:
serverless: true
stack: true
---
teardown:
- do:
indices.delete_index_template:
name: existing_test
- do:
cluster.delete_component_template:
name: ct
---
"Simulate template":
- do:
indices.put_index_template:
name: existing_test
body:
index_patterns: te*
priority: 10
template:
mappings:
properties:
field:
type: keyword
- do:
cluster.put_component_template:
name: ct
body:
template:
mappings:
properties:
ct_field:
type: keyword
- do:
indices.simulate_template:
body:
index_patterns: te*
priority: 15
template:
settings:
index.blocks.write: true
aliases:
test_alias: {}
composed_of: ["ct"]
- match: {template.settings.index.blocks.write: "true"}
- match: {template.mappings.properties.ct_field.type: "keyword"}
- match: {overlapping.0.name: existing_test}
- match: {overlapping.0.index_patterns: ["te*"]}
- is_true: template.aliases.test_alias