From 54165070048a687ae53ac0d216cdfe9af942d94f Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Thu, 22 Aug 2024 17:05:01 -0400 Subject: [PATCH] Added tests for /_cluster/allocation/explain. (#523) Signed-off-by: dblock --- tests/default/cluster/allocation/explain.yaml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/default/cluster/allocation/explain.yaml diff --git a/tests/default/cluster/allocation/explain.yaml b/tests/default/cluster/allocation/explain.yaml new file mode 100644 index 000000000..1525d2732 --- /dev/null +++ b/tests/default/cluster/allocation/explain.yaml @@ -0,0 +1,31 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test cluster allocation explain requests. +epilogues: + - path: /games + method: DELETE + status: [200, 404] +prologues: + - path: /{index} + method: PUT + parameters: + index: games +chapters: + - synopsis: Finds an unassigned shard and explains why it can't be allocated to a node (GET). + path: /_cluster/allocation/explain + method: GET + response: + status: 200 + - synopsis: Finds an unassigned shard and explains why it can't be allocated to a node (POST). + path: /_cluster/allocation/explain + method: POST + parameters: + include_yes_decisions: true + include_disk_info: true + request: + payload: + index: games + shard: 0 + primary: true + response: + status: 200