Skip to content

Commit

Permalink
Adds tests for /_remote/info and _script_context. (#637)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
dblock and brunoLloret authored Oct 24, 2024
1 parent 61e6ec3 commit 552e5e4
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
10 changes: 10 additions & 0 deletions tests/default/_core/refresh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test _refresh.

chapters:
- synopsis: Refresh all indices in the cluster.
path: /_refresh
method: GET
response:
status: 200
27 changes: 27 additions & 0 deletions tests/default/_core/remote/info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test _remote/info.

prologues:
- method: PUT
path: /_cluster/settings
request:
payload:
transient:
cluster.remote:
cluster2:
seeds:
- localhost:4242
chapters:
- synopsis: Retrieve information about remote clusters.
path: /_remote/info
method: GET
response:
status: 200
epilogues:
- method: PUT
path: /_cluster/settings
request:
payload:
transient:
cluster.remote.cluster2.seeds: []
10 changes: 10 additions & 0 deletions tests/default/_core/script_context.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test the _script_context endpoint to retrieve available script contexts.

chapters:
- synopsis: Retrieve available script contexts.
path: /_script_context
method: GET
response:
status: 200
5 changes: 0 additions & 5 deletions tests/default/indices/refresh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ prologues:
year: 1991
status: [201]
chapters:
- synopsis: Refresh.
path: /_refresh
method: POST
response:
status: 200
- synopsis: Refresh an index.
path: /{index}/_refresh
method: POST
Expand Down

0 comments on commit 552e5e4

Please sign in to comment.