From 262c1817486f0b7a42f14ae072e536adb2fc9c2b Mon Sep 17 00:00:00 2001 From: javanna Date: Wed, 23 May 2018 15:43:50 +0200 Subject: [PATCH] Restore "Add more yaml tests for get alias API " These additional tests were previously reverted in 6.x due to failing bwc tests. They should be skipped against 5.6 nodes, bwc tests fail when the node hit by the request is on 5.6. Relates to #29513 Relates to #25114 Closes #30806 --- .../test/indices.get_alias/10_basic.yml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_alias/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_alias/10_basic.yml index 4e3861b059bdf..c447d91439224 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_alias/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_alias/10_basic.yml @@ -20,6 +20,10 @@ setup: --- "Get all aliases via /_alias": + - do: + indices.create: + index: test_index_3 + - do: indices.get_alias: {} @@ -27,7 +31,47 @@ setup: - match: {test_index.aliases.test_blias: {}} - match: {test_index_2.aliases.test_alias: {}} - match: {test_index_2.aliases.test_blias: {}} + - match: {test_index_3.aliases: {}} + +--- +"Get aliases via /_alias/_all": + - skip: + version: " - 5.99.99" + reason: 5.x returns indices that have no aliases + + - do: + indices.create: + index: test_index_3 + + - do: + indices.get_alias: + name: _all + + - match: {test_index.aliases.test_alias: {}} + - match: {test_index.aliases.test_blias: {}} + - match: {test_index_2.aliases.test_alias: {}} + - match: {test_index_2.aliases.test_blias: {}} + - is_false: test_index_3 + +--- +"Get aliases via /_alias/*": + - skip: + version: " - 5.99.99" + reason: 5.x returns indices that have no aliases + + - do: + indices.create: + index: test_index_3 + - do: + indices.get_alias: + name: _all + + - match: {test_index.aliases.test_alias: {}} + - match: {test_index.aliases.test_blias: {}} + - match: {test_index_2.aliases.test_alias: {}} + - match: {test_index_2.aliases.test_blias: {}} + - is_false: test_index_3 --- "Get all aliases via /{index}/_alias/":