Skip to content

Commit e3637d7

Browse files
committed
adding yaml rest test for get settings
1 parent 3f24b89 commit e3637d7

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

modules/data-streams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/240_data_stream_settings.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
setup:
2-
- skip:
2+
- skip:
33
features: allowed_warnings
44

55
---
@@ -30,6 +30,22 @@ setup:
3030
index: "my-data-stream-1"
3131
wait_for_status: green
3232

33+
- do:
34+
indices.get_data_stream_settings:
35+
name: my-data-stream-1
36+
- match: { data_streams.0.name: my-data-stream-1 }
37+
- match: { data_streams.0.settings: {} }
38+
- match: { data_streams.0.effective_settings.index.number_of_shards: null }
39+
- match: { data_streams.0.effective_settings.index.number_of_replicas: "0" }
40+
- match: { data_streams.0.effective_settings.index.lifecycle.name: "my-policy" }
41+
42+
- do:
43+
indices.get_data_stream:
44+
name: my-data-stream-1
45+
- match: { data_streams.0.name: my-data-stream-1 }
46+
- match: { data_streams.0.settings: {} }
47+
- match: { data_streams.0.effective_settings: null }
48+
3349
- do:
3450
indices.put_data_stream_settings:
3551
name: my-data-stream-1
@@ -45,6 +61,22 @@ setup:
4561
- match: { data_streams.0.effective_settings.index.number_of_replicas: "0" }
4662
- match: { data_streams.0.effective_settings.index.lifecycle.name: "my-policy" }
4763

64+
- do:
65+
indices.get_data_stream_settings:
66+
name: my-data-stream-1
67+
- match: { data_streams.0.name: my-data-stream-1 }
68+
- match: { data_streams.0.settings.index.number_of_shards: "2" }
69+
- match: { data_streams.0.effective_settings.index.number_of_shards: "2" }
70+
- match: { data_streams.0.effective_settings.index.number_of_replicas: "0" }
71+
- match: { data_streams.0.effective_settings.index.lifecycle.name: "my-policy" }
72+
73+
- do:
74+
indices.get_data_stream:
75+
name: my-data-stream-1
76+
- match: { data_streams.0.name: my-data-stream-1 }
77+
- match: { data_streams.0.settings.index.number_of_shards: "2" }
78+
- match: { data_streams.0.effective_settings: null }
79+
4880
---
4981
"Test invalid settings":
5082
- do:
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"indices.get_data_stream_settings":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html",
5+
"description":"Gets a data stream's settings"
6+
},
7+
"stability":"stable",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"]
11+
},
12+
"url":{
13+
"paths":[
14+
{
15+
"path":"/_data_stream/{name}/_settings",
16+
"methods":[
17+
"GET"
18+
],
19+
"parts":{
20+
"name":{
21+
"type":"string",
22+
"description":"The name of the data stream or data stream pattern"
23+
}
24+
}
25+
}
26+
]
27+
},
28+
"params":{
29+
"timeout":{
30+
"type":"time",
31+
"description":"Specify timeout for acknowledging the cluster state update"
32+
},
33+
"master_timeout":{
34+
"type":"time",
35+
"description":"Specify timeout for connection to master"
36+
}
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)