Skip to content

Commit 2ddd08a

Browse files
authored
Fixing ingest simulate yaml rest test when there is a global legacy template (elastic#115559)
The ingest simulate yaml rest test `Test mapping addition works with indices without templates` tests what happens when an index has a mapping but matches no template at all. However, randomly and rarely a global match-all legacy template is applied to the cluster. When this happens, the assumptions for the test fail since the index matches a template. This PR removes that global legacy template so that the test works as intended. Closes elastic#115412 Closes elastic#115472
1 parent f5d3c7c commit 2ddd08a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@ tests:
264264
- class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests
265265
method: testProcessFileChanges
266266
issue: https://github.com/elastic/elasticsearch/issues/115280
267-
- class: org.elasticsearch.smoketest.SmokeTestIngestWithAllDepsClientYamlTestSuiteIT
268-
method: test {yaml=ingest/80_ingest_simulate/Test mapping addition works with legacy templates}
269-
issue: https://github.com/elastic/elasticsearch/issues/115412
270267
- class: org.elasticsearch.xpack.security.FileSettingsRoleMappingsRestartIT
271268
method: testFileSettingsReprocessedOnRestartWithoutVersionChange
272269
issue: https://github.com/elastic/elasticsearch/issues/115450

qa/smoke-test-ingest-with-all-dependencies/src/yamlRestTest/resources/rest-api-spec/test/ingest/80_ingest_simulate.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,13 @@ setup:
15861586
cluster_features: ["simulate.support.non.template.mapping"]
15871587
reason: "ingest simulate support for indices with mappings that didn't come from templates added in 8.17"
15881588

1589+
# A global match-everything legacy template is added to the cluster sometimes (rarely). We have to get rid of this template if it exists
1590+
# because this test is making sure we get correct behavior when an index matches *no* template:
1591+
- do:
1592+
indices.delete_template:
1593+
name: '*'
1594+
ignore: 404
1595+
15891596
# First, make sure that validation fails before we create the index (since we are only defining to bar field but trying to index a value
15901597
# for foo.
15911598
- do:

0 commit comments

Comments
 (0)