From 067e9c35a2896860aa153b385ccf8d82b679f7ec Mon Sep 17 00:00:00 2001 From: dblock Date: Wed, 13 Nov 2024 11:14:01 -0500 Subject: [PATCH 1/2] Added test for POST /{index}/_aliases/{name}. Signed-off-by: dblock --- tests/default/indices/aliases/aliases.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/default/indices/aliases/aliases.yaml b/tests/default/indices/aliases/aliases.yaml index 503188143..6f9850a84 100644 --- a/tests/default/indices/aliases/aliases.yaml +++ b/tests/default/indices/aliases/aliases.yaml @@ -10,12 +10,21 @@ prologues: method: PUT chapters: - synopsis: Create an alias by name. + path: /{index}/_aliases/{name} + method: POST + parameters: + index: games + name: jeux + - synopsis: Update an alias by name (query). path: /{index}/_aliases/{name} method: PUT parameters: index: games name: jeux - - synopsis: Update an alias. + request: + payload: + is_write_index: true + - synopsis: Update an alias by name (payload). path: /{index}/_aliases method: PUT parameters: From 85e0267e5a8094743682f9bbf1153288d65940de Mon Sep 17 00:00:00 2001 From: dblock Date: Wed, 13 Nov 2024 11:23:21 -0500 Subject: [PATCH 2/2] Added tests for POST /{alias}/_rollover/{new_index}. Signed-off-by: dblock --- tests/default/indices/alias/rollover.yaml | 29 +++++++++++++++++++ .../default/indices/data_stream/rollover.yaml | 2 -- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 tests/default/indices/alias/rollover.yaml diff --git a/tests/default/indices/alias/rollover.yaml b/tests/default/indices/alias/rollover.yaml new file mode 100644 index 000000000..740a06357 --- /dev/null +++ b/tests/default/indices/alias/rollover.yaml @@ -0,0 +1,29 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test rolling over aliases. +epilogues: + - path: /games + method: DELETE + status: [200, 404] + - path: /rollover + method: DELETE + status: [200, 404] +prologues: + - path: games + method: PUT + - path: /games/_alias/jeux + method: POST +chapters: + - synopsis: Manually roll over an index. + path: /{alias}/_rollover/{new_index} + method: POST + parameters: + alias: jeux + new_index: rollover + response: + status: 200 + payload: + acknowledged: true + old_index: games + new_index: rollover + rolled_over: true diff --git a/tests/default/indices/data_stream/rollover.yaml b/tests/default/indices/data_stream/rollover.yaml index 5e0c637be..853a9ea14 100644 --- a/tests/default/indices/data_stream/rollover.yaml +++ b/tests/default/indices/data_stream/rollover.yaml @@ -30,8 +30,6 @@ epilogues: status: [200, 404] chapters: - synopsis: Manually roll over a data stream. - warnings: - multiple-paths-detected: false path: /{alias}/_rollover method: POST parameters: