Skip to content

Commit aae6b16

Browse files
authored
Unmute 'Create data stream' yaml rest test and (#81201) (#81219)
move the assertions of replicated field to a new test with different skip versions. (The replicated was recently added and when the 'Create data stream' yaml rest test is ran against older clusters this caused failured) Closes #81164
1 parent 762e537 commit aae6b16

File tree

1 file changed

+50
-2
lines changed
  • x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/data_stream

1 file changed

+50
-2
lines changed

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/data_stream/10_basic.yml

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,13 @@ setup:
5454
- match: { data_streams.0.status: 'GREEN' }
5555
- match: { data_streams.0.template: 'my-template1' }
5656
- match: { data_streams.0.hidden: false }
57-
- match: { data_streams.0.replicated: false }
5857
- match: { data_streams.1.name: simple-data-stream2 }
5958
- match: { data_streams.1.timestamp_field.name: '@timestamp' }
6059
- match: { data_streams.1.generation: 1 }
6160
- length: { data_streams.1.indices: 1 }
6261
- match: { data_streams.1.indices.0.index_name: '/\.ds-simple-data-stream2-(\d{4}\.\d{2}\.\d{2}-)?000001/' }
6362
- match: { data_streams.1.template: 'my-template2' }
6463
- match: { data_streams.1.hidden: false }
65-
- match: { data_streams.1.replicated: false }
6664

6765
# save the backing index names for later use
6866
- set: { data_streams.0.indices.0.index_name: idx0name }
@@ -622,3 +620,53 @@ setup:
622620
catch: /cannot create index with name \[logs-foobar\], because it matches with template \[generic_logs_template\] that creates data streams only, use create data stream api instead/
623621
indices.create:
624622
index: logs-foobar
623+
624+
---
625+
"Get data stream api check existence of replicated and allow_custom_routing fields":
626+
- skip:
627+
version: " - 7.16.0"
628+
reason: "replicated and allow_custom_routing fields only supported in 7.16+"
629+
630+
- do:
631+
indices.create_data_stream:
632+
name: simple-data-stream1
633+
- is_true: acknowledged
634+
635+
- do:
636+
indices.create_data_stream:
637+
name: simple-data-stream2
638+
- is_true: acknowledged
639+
640+
- do:
641+
indices.get_data_stream:
642+
name: "*"
643+
- match: { data_streams.0.name: simple-data-stream1 }
644+
- match: { data_streams.0.timestamp_field.name: '@timestamp' }
645+
- match: { data_streams.0.generation: 1 }
646+
- length: { data_streams.0.indices: 1 }
647+
- match: { data_streams.0.indices.0.index_name: '/\.ds-simple-data-stream1-(\d{4}\.\d{2}\.\d{2}-)?000001/' }
648+
- match: { data_streams.0.status: 'GREEN' }
649+
- match: { data_streams.0.template: 'my-template1' }
650+
- match: { data_streams.0.hidden: false }
651+
- match: { data_streams.0.replicated: false }
652+
- match: { data_streams.0.allow_custom_routing: false }
653+
- match: { data_streams.1.name: simple-data-stream2 }
654+
- match: { data_streams.1.timestamp_field.name: '@timestamp' }
655+
- match: { data_streams.1.generation: 1 }
656+
- length: { data_streams.1.indices: 1 }
657+
- match: { data_streams.1.indices.0.index_name: '/\.ds-simple-data-stream2-(\d{4}\.\d{2}\.\d{2}-)?000001/' }
658+
- match: { data_streams.1.template: 'my-template2' }
659+
- match: { data_streams.1.hidden: false }
660+
- match: { data_streams.1.replicated: false }
661+
- match: { data_streams.1.allow_custom_routing: false }
662+
663+
- do:
664+
indices.delete_data_stream:
665+
name: simple-data-stream1
666+
- is_true: acknowledged
667+
668+
- do:
669+
indices.delete_data_stream:
670+
name: simple-data-stream2
671+
- is_true: acknowledged
672+

0 commit comments

Comments
 (0)