Skip to content

Commit

Permalink
Add allowed warnings to index template v2 YAML tests (#54535) (#54541)
Browse files Browse the repository at this point in the history
There is a setting in `ESClientYamlSuiteTestCase` under `usually()` that can install a `global`
template changing the number of shards for all indices. This can cause warnings when installing v2
templates (see #54367). This adds these as optional warnings so they don't cause failures regardless
of whether the global template is installed or not.

These warnings can be removed when our internal template usage has been moved to index templates v2

Relates to #53101
  • Loading branch information
dakrone authored Mar 31, 2020
1 parent d6f9d7b commit 2a77551
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
setup:
- skip:
version: " - 7.99.99"
reason: "index template v2 API has not been backported"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

- do:
allowed_warnings:
- "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
indices.put_index_template:
name: test
body:
Expand Down Expand Up @@ -35,10 +38,13 @@ setup:
---
"Get all tindex emplates":
- skip:
version: " - 7.99.99"
reason: "index template v2 API has not been backported"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

- do:
allowed_warnings:
- "index template [test2] has index patterns [test2-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test2] will take precedence during new index creation"
indices.put_index_template:
name: test2
body:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
"Put index template":
- skip:
version: " - 7.99.99"
reason: "index template v2 API has not been backported"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

- do:
allowed_warnings:
- "index template [test] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
indices.put_index_template:
name: test
body:
Expand All @@ -30,10 +33,13 @@
---
"Put multiple index templates":
- skip:
version: " - 7.99.99"
reason: "index template v2 API has not been backported"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

- do:
allowed_warnings:
- "index template [test] has index patterns [test-*, test2-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test] will take precedence during new index creation"
indices.put_index_template:
name: test
body:
Expand Down Expand Up @@ -67,10 +73,13 @@
---
"Put index template with 'create' flag":
- skip:
version: " - 7.99.99"
reason: "index template v2 API has not been backported"
version: " - 7.7.99"
reason: "index template v2 API unavailable before 7.8"
features: allowed_warnings

- do:
allowed_warnings:
- "index template [test2] has index patterns [test-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [test2] will take precedence during new index creation"
indices.put_index_template:
name: test2
body:
Expand Down

0 comments on commit 2a77551

Please sign in to comment.