Skip to content

Commit 552e5e4

Browse files
dblockbrunoLloret
andauthored
Adds tests for /_remote/info and _script_context. (#637)
* tests/default/_core/ refresh, remote_info and script_context Signed-off-by: Bruno Lloret <[email protected]> Signed-off-by: dblock <[email protected]> Co-authored-by: Bruno Lloret <[email protected]>
1 parent 61e6ec3 commit 552e5e4

File tree

4 files changed

+47
-5
lines changed

4 files changed

+47
-5
lines changed

tests/default/_core/refresh.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$schema: ../../../json_schemas/test_story.schema.yaml
2+
3+
description: Test _refresh.
4+
5+
chapters:
6+
- synopsis: Refresh all indices in the cluster.
7+
path: /_refresh
8+
method: GET
9+
response:
10+
status: 200

tests/default/_core/remote/info.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
$schema: ../../../../json_schemas/test_story.schema.yaml
2+
3+
description: Test _remote/info.
4+
5+
prologues:
6+
- method: PUT
7+
path: /_cluster/settings
8+
request:
9+
payload:
10+
transient:
11+
cluster.remote:
12+
cluster2:
13+
seeds:
14+
- localhost:4242
15+
chapters:
16+
- synopsis: Retrieve information about remote clusters.
17+
path: /_remote/info
18+
method: GET
19+
response:
20+
status: 200
21+
epilogues:
22+
- method: PUT
23+
path: /_cluster/settings
24+
request:
25+
payload:
26+
transient:
27+
cluster.remote.cluster2.seeds: []
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$schema: ../../../json_schemas/test_story.schema.yaml
2+
3+
description: Test the _script_context endpoint to retrieve available script contexts.
4+
5+
chapters:
6+
- synopsis: Retrieve available script contexts.
7+
path: /_script_context
8+
method: GET
9+
response:
10+
status: 200

tests/default/indices/refresh.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ prologues:
1414
year: 1991
1515
status: [201]
1616
chapters:
17-
- synopsis: Refresh.
18-
path: /_refresh
19-
method: POST
20-
response:
21-
status: 200
2217
- synopsis: Refresh an index.
2318
path: /{index}/_refresh
2419
method: POST

0 commit comments

Comments
 (0)