Skip to content

Commit

Permalink
Added tests for /_cluster/pending_tasks. (#544)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Aug 30, 2024
1 parent a83d5b2 commit 3f806a1
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/default/cat/pending_tasks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test cat/pending_tasks endpoints.
epilogues:
- path: /movies
method: DELETE
status: [200, 404]
- path: /films
method: DELETE
status: [200, 404]
prologues:
- path: /{index}/_doc
method: POST
parameters:
index: movies
refresh: true
request:
payload:
title: Beauty and the Beast
year: 91
status: [201]
- path: /_reindex
method: POST
parameters:
wait_for_completion: false
request:
payload:
source:
index: movies
dest:
index: films
chapters:
- synopsis: List the progress of all pending tasks.
path: /_cat/pending_tasks
Expand Down
40 changes: 40 additions & 0 deletions tests/default/cluster/pending_tasks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test cluster-level changes that have not yet been executed.
epilogues:
- path: /movies
method: DELETE
status: [200, 404]
- path: /films
method: DELETE
status: [200, 404]
prologues:
- path: /{index}/_doc
method: POST
parameters:
index: movies
refresh: true
request:
payload:
title: Beauty and the Beast
year: 91
status: [201]
- path: /_reindex
method: POST
parameters:
wait_for_completion: false
request:
payload:
source:
index: movies
dest:
index: films
chapters:
- synopsis: Returns cluster-level changes that have not yet been executed.
path: /_cluster/pending_tasks
method: GET
response:
status: 200
payload:
tasks:
- executing: true

0 comments on commit 3f806a1

Please sign in to comment.