From ade82601faedaa4b1fa7d30ec73f8e92a414fb60 Mon Sep 17 00:00:00 2001 From: Amol Kapoor Date: Mon, 1 Jul 2024 10:39:41 -0400 Subject: [PATCH] Create 50_remove_and_add_same_alias.yaml Signed-off-by: Amol Kapoor --- .../50_remove_and_add_same_alias.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/50_remove_and_add_same_alias.yaml diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/50_remove_and_add_same_alias.yaml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/50_remove_and_add_same_alias.yaml new file mode 100644 index 0000000000000..b94fbd8efb9df --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.update_aliases/50_remove_and_add_same_alias.yaml @@ -0,0 +1,41 @@ +--- +"Ensure update_aliases actions are done sequentially when operating on the same alias" +setup: + - do: + indices.create: + index: test_index + body: + settings: + number_of_shards: 1 + number_of_replicas: 0 + + - do: + indices.update_aliases: + body: + actions: + - add: + index: test_index + alias: alias1 + +--- +- do: + indices.update_aliases: + body: + actions: + - remove: + index: test_index + alias: alias1 + - add: + index: test_index + alias: alias1 + +- do: + indices.get_alias: + name: alias1 + - match: { test_index.aliases.alias1: {} } + +--- +teardown: + - do: + indices.delete: + index: test_index