Skip to content

Commit c7dc033

Browse files
Add allowed warnings to index template composition tests (#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 #54822 Co-authored-by: Elastic Machine <[email protected]>
1 parent f3f8ae5 commit c7dc033

File tree

1 file changed

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

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- skip:
44
version: " - 7.7.99"
55
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:
@@ -87,8 +90,11 @@
8790
- skip:
8891
version: " - 7.7.99"
8992
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:
@@ -125,6 +133,7 @@
125133
- skip:
126134
version: " - 7.7.99"
127135
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:
@@ -167,8 +178,11 @@
167178
- skip:
168179
version: " - 7.7.99"
169180
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)