Skip to content

Commit

Permalink
Split get data stream api yaml test in two tests. (#81648)
Browse files Browse the repository at this point in the history
Backporting #81590 to 7.17 branch.

Split yaml test that verifies allow_custom_routing and replicated fields are included in get data stream api.
This is because `allow_custom_routing` field is only included from 8.0 and
`replicated` field is only included from 7.16. Each test has its own skip version section.
The current test was reused in bwc qa tests, which caused test failures.

Closes #81462
  • Loading branch information
martijnvg committed Dec 21, 2021
1 parent bbd08e2 commit 59df347
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,10 @@ setup:
index: logs-foobar

---
"Get data stream api check existence of replicated and allow_custom_routing fields":
"Get data stream api check existence of replicated field":
- skip:
version: all
reason: "https://github.com/elastic/elasticsearch/issues/81462"
version: " - 7.16.0"
reason: "replicated field only supported from 7.16+ and later"

- do:
indices.create_data_stream:
Expand All @@ -649,7 +649,6 @@ setup:
- match: { data_streams.0.template: 'my-template1' }
- match: { data_streams.0.hidden: false }
- match: { data_streams.0.replicated: false }
- match: { data_streams.0.allow_custom_routing: false }
- match: { data_streams.1.name: simple-data-stream2 }
- match: { data_streams.1.timestamp_field.name: '@timestamp' }
- match: { data_streams.1.generation: 1 }
Expand All @@ -658,7 +657,6 @@ setup:
- match: { data_streams.1.template: 'my-template2' }
- match: { data_streams.1.hidden: false }
- match: { data_streams.1.replicated: false }
- match: { data_streams.1.allow_custom_routing: false }

- do:
indices.delete_data_stream:
Expand All @@ -669,4 +667,3 @@ setup:
indices.delete_data_stream:
name: simple-data-stream2
- is_true: acknowledged

0 comments on commit 59df347

Please sign in to comment.