Skip to content

Commit 4a630eb

Browse files
committed
Updates indices.simulate_template and info tests
I updated info to test for Serverless and Stack in different tests. When using simulate_index_template in Serverless with index_pattern, it returns the following error: ``` [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/_index_template/_simulate_index/test] contains unrecognized parameter: [body[index_patterns]]"}],"type":"illegal_argument_exception","reason":"request [/_index_template/_simulate_index/test] contains unrecognized parameter: [body[index_patterns]]"},"status":400} ``` However, it is a required parameter in Stack, so I made 2 different test files for Stack and Serverless.
1 parent 3020283 commit 4a630eb

4 files changed

+56
-2
lines changed

tests/indices/simulate_template.yml tests/indices/simulate_template_serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
requires:
33
serverless: true
4-
stack: true
4+
stack: false
55
---
66
teardown:
77
- do:
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
requires:
3+
serverless: false
4+
stack: true
5+
---
6+
teardown:
7+
- do:
8+
indices.delete_index_template:
9+
name: existing_test
10+
- do:
11+
cluster.delete_component_template:
12+
name: ct
13+
---
14+
"Simulate template":
15+
- do:
16+
indices.put_index_template:
17+
name: existing_test
18+
body:
19+
index_patterns: te*
20+
priority: 10
21+
template:
22+
mappings:
23+
properties:
24+
field:
25+
type: keyword
26+
27+
- do:
28+
cluster.put_component_template:
29+
name: ct
30+
body:
31+
template:
32+
mappings:
33+
properties:
34+
ct_field:
35+
type: keyword
36+
- do:
37+
indices.simulate_index_template:
38+
name: test
39+
body:
40+
index_patterns: t*
41+
template:
42+
aliases:
43+
test_alias: {}
44+
- match: { overlapping.0.name: '/simulate_index_template_.*/' }
45+
- match: { overlapping.0.index_patterns: ["t*"] }

tests/info.yml tests/info_serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
requires:
33
serverless: true
4-
stack: true
4+
stack: false
55
---
66
'info':
77
- do:

tests/info_stack.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
requires:
3+
serverless: false
4+
stack: true
5+
---
6+
'info':
7+
- do:
8+
info: {}
9+
- match: { tagline: 'You Know, for Search' }

0 commit comments

Comments
 (0)