Skip to content

Commit ba4afe3

Browse files
Add allowed warnings to index template composition tests (elastic#54916)
We occasionally add a global template for our YAML tests, and this can cause warnings for these template tests. This commit adds these warnings so they don't cause test failures. Resolves elastic#54822 Co-authored-by: Elastic Machine <[email protected]>
1 parent a5391c9 commit ba4afe3

File tree

1 file changed

+18
-4
lines changed
  • rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_index_template

1 file changed

+18
-4
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_index_template/15_composition.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"Component and index template composition":
33
- skip:
44
version: " - 7.7.99"
5-
reason: "itv2 is available in 7.8+"
5+
reason: "index template v2 API unavailable before 7.8"
6+
features: allowed_warnings
67

78
- do:
89
cluster.put_component_template:
@@ -35,6 +36,8 @@
3536
is_write_index: true
3637

3738
- do:
39+
allowed_warnings:
40+
- "index template [my-template] has index patterns [foo, bar-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template] will take precedence during new index creation"
3841
indices.put_index_template:
3942
name: my-template
4043
body:
@@ -86,9 +89,12 @@
8689
"Index template priority":
8790
- skip:
8891
version: " - 7.7.99"
89-
reason: "itv2 is available in 7.8+"
92+
reason: "index template v2 API unavailable before 7.8"
93+
features: allowed_warnings
9094

9195
- do:
96+
allowed_warnings:
97+
- "index template [my-template] has index patterns [foo, bar-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template] will take precedence during new index creation"
9298
indices.put_index_template:
9399
name: my-template
94100
body:
@@ -100,6 +106,8 @@
100106
priority: 400
101107

102108
- do:
109+
allowed_warnings:
110+
- "index template [another-template] has index patterns [bar-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [another-template] will take precedence during new index creation"
103111
indices.put_index_template:
104112
name: another-template
105113
body:
@@ -124,7 +132,8 @@
124132
"Component template only composition":
125133
- skip:
126134
version: " - 7.7.99"
127-
reason: "itv2 is available in 7.8+"
135+
reason: "index template v2 API unavailable before 7.8"
136+
features: allowed_warnings
128137

129138
- do:
130139
cluster.put_component_template:
@@ -145,6 +154,8 @@
145154
type: keyword
146155

147156
- do:
157+
allowed_warnings:
158+
- "index template [my-template] has index patterns [baz*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template] will take precedence during new index creation"
148159
indices.put_index_template:
149160
name: my-template
150161
body:
@@ -166,9 +177,12 @@
166177
"Index template without component templates":
167178
- skip:
168179
version: " - 7.7.99"
169-
reason: "itv2 is available in 7.8+"
180+
reason: "index template v2 API unavailable before 7.8"
181+
features: allowed_warnings
170182

171183
- do:
184+
allowed_warnings:
185+
- "index template [my-template] has index patterns [eggplant] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template] will take precedence during new index creation"
172186
indices.put_index_template:
173187
name: my-template
174188
body:

0 commit comments

Comments
 (0)