Skip to content

Commit 3f806a1

Browse files
authored
Added tests for /_cluster/pending_tasks. (#544)
Signed-off-by: dblock <[email protected]>
1 parent a83d5b2 commit 3f806a1

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

tests/default/cat/pending_tasks.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
$schema: ../../../json_schemas/test_story.schema.yaml
22

33
description: Test cat/pending_tasks endpoints.
4+
epilogues:
5+
- path: /movies
6+
method: DELETE
7+
status: [200, 404]
8+
- path: /films
9+
method: DELETE
10+
status: [200, 404]
11+
prologues:
12+
- path: /{index}/_doc
13+
method: POST
14+
parameters:
15+
index: movies
16+
refresh: true
17+
request:
18+
payload:
19+
title: Beauty and the Beast
20+
year: 91
21+
status: [201]
22+
- path: /_reindex
23+
method: POST
24+
parameters:
25+
wait_for_completion: false
26+
request:
27+
payload:
28+
source:
29+
index: movies
30+
dest:
31+
index: films
432
chapters:
533
- synopsis: List the progress of all pending tasks.
634
path: /_cat/pending_tasks
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
$schema: ../../../json_schemas/test_story.schema.yaml
2+
3+
description: Test cluster-level changes that have not yet been executed.
4+
epilogues:
5+
- path: /movies
6+
method: DELETE
7+
status: [200, 404]
8+
- path: /films
9+
method: DELETE
10+
status: [200, 404]
11+
prologues:
12+
- path: /{index}/_doc
13+
method: POST
14+
parameters:
15+
index: movies
16+
refresh: true
17+
request:
18+
payload:
19+
title: Beauty and the Beast
20+
year: 91
21+
status: [201]
22+
- path: /_reindex
23+
method: POST
24+
parameters:
25+
wait_for_completion: false
26+
request:
27+
payload:
28+
source:
29+
index: movies
30+
dest:
31+
index: films
32+
chapters:
33+
- synopsis: Returns cluster-level changes that have not yet been executed.
34+
path: /_cluster/pending_tasks
35+
method: GET
36+
response:
37+
status: 200
38+
payload:
39+
tasks:
40+
- executing: true

0 commit comments

Comments
 (0)