Skip to content

Commit

Permalink
Add allowed warnings to index template v2 YAML tests
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 elastic#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 elastic#53101
  • Loading branch information
dakrone committed Mar 31, 2020
1 parent 922ec8e commit 3bcd3d2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ setup:
- skip:
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 @@ -37,8 +40,11 @@ setup:
- skip:
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
Expand Up @@ -3,8 +3,11 @@
- skip:
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 @@ -32,8 +35,11 @@
- skip:
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 @@ -69,8 +75,11 @@
- skip:
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 3bcd3d2

Please sign in to comment.