Skip to content

Commit fca0e8a

Browse files
committed
Adds tests
- enrich.stats - cat.health - indices.delete_data_lifecycle - indices.(put,get,delete)_template
1 parent ab6c9cc commit fca0e8a

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed

tests/cat/health.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
requires:
3+
serverless: false
4+
stack: true
5+
---
6+
"Health":
7+
- do:
8+
cat.health:
9+
format: json
10+
- match: { 0.epoch: '/[0-9]+/' }
11+
- match: { 0.status: '/[green|yellow]/' }

tests/enrich/10_basic.yml

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ teardown:
4040
name: 'policy_test'
4141
- match: { policies.0.config.match.name: 'policy_test' }
4242

43+
- do:
44+
enrich.stats: {}
45+
- is_true: 'executing_policies'
46+
- match: { coordinator_stats.0.node_id: '/[a-zA-Z0-9]+/' }
47+
4348
- do:
4449
enrich.delete_policy:
4550
name: 'policy_test'

tests/indices/data_lifecycle.yml

+4
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ teardown:
2626
- do:
2727
indices.explain_data_lifecycle: { index: 'my-data-stream' }
2828
- match: { indices.my-data-stream.index: 'my-data-stream' }
29+
- do:
30+
indices.delete_data_lifecycle:
31+
name: 'my-data-stream'
32+
- match: { acknowledged: true }

tests/indices/template.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
requires:
3+
serverless: false
4+
stack: true
5+
---
6+
'Put template':
7+
- do:
8+
indices.put_template:
9+
name: test
10+
body:
11+
index_patterns: 'test-*'
12+
settings:
13+
number_of_shards: 1
14+
number_of_replicas: 0
15+
mappings:
16+
properties:
17+
field:
18+
type: keyword
19+
20+
- do:
21+
indices.get_template:
22+
name: test
23+
flat_settings: true
24+
25+
- match: {test.index_patterns: ["test-*"]}
26+
- match: {test.settings: {index.number_of_shards: '1', index.number_of_replicas: '0'}}
27+
- match: {test.mappings: {properties: {field: {type: keyword}}}}
28+
- do:
29+
indices.delete_template:
30+
name: "test"
31+
- match: { acknowledged: true }

0 commit comments

Comments
 (0)