From 9da76e3ebe1411fbdb8b19450624223544ac8a16 Mon Sep 17 00:00:00 2001 From: dblock Date: Wed, 13 Nov 2024 11:23:21 -0500 Subject: [PATCH] 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 | 5 ++-- 2 files changed, 32 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..f47feae06 100644 --- a/tests/default/indices/data_stream/rollover.yaml +++ b/tests/default/indices/data_stream/rollover.yaml @@ -22,6 +22,9 @@ prologues: message: login attempt failed request_time: '2013-03-01T00:00:00' epilogues: + - path: /_data_stream/logs-nginx-rollover + method: DELETE + status: [200, 404] - path: /_data_stream/logs-nginx method: DELETE status: [200, 404] @@ -30,8 +33,6 @@ epilogues: status: [200, 404] chapters: - synopsis: Manually roll over a data stream. - warnings: - multiple-paths-detected: false path: /{alias}/_rollover method: POST parameters: