Skip to content

Commit d3705e6

Browse files
authored
Fixing ingest simulate yaml rest test when there is a global legacy template (#115559) (#115599)
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 #115412 Closes #115472
1 parent d66b54f commit d3705e6

File tree

1 file changed

+7
-0
lines changed
  • qa/smoke-test-ingest-with-all-dependencies/src/yamlRestTest/resources/rest-api-spec/test/ingest

1 file changed

+7
-0
lines changed

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
@@ -1588,6 +1588,13 @@ setup:
15881588
cluster_features: ["simulate.support.non.template.mapping"]
15891589
reason: "ingest simulate support for indices with mappings that didn't come from templates added in 8.17"
15901590

1591+
# A global match-everything legacy template is added to the cluster sometimes (rarely). We have to get rid of this template if it exists
1592+
# because this test is making sure we get correct behavior when an index matches *no* template:
1593+
- do:
1594+
indices.delete_template:
1595+
name: '*'
1596+
ignore: 404
1597+
15911598
# 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
15921599
# for foo.
15931600
- do:

0 commit comments

Comments
 (0)