diff --git a/rest-api-spec/test/indices.delete_alias/10_basic.yaml b/rest-api-spec/test/indices.delete_alias/10_basic.yaml new file mode 100644 index 00000000000..a6e4d1ab84a --- /dev/null +++ b/rest-api-spec/test/indices.delete_alias/10_basic.yaml @@ -0,0 +1,30 @@ +--- +"Basic test for delete alias": + - do: + indices.create: + index: testind + + - do: + indices.put_alias: + index: testind + name: testali + body: + routing: "routing value" + + - do: + indices.get_alias: + name: testali + + - match: {testind.aliases.testali.search_routing: "routing value"} + - match: {testind.aliases.testali.index_routing: "routing value"} + + - do: + indices.delete_alias: + index: testind + name: testali + + - do: + catch: missing + indices.get_alias: + index: testind + name: testali diff --git a/rest-api-spec/test/indices.put_alias/10_basic.yaml b/rest-api-spec/test/indices.put_alias/10_basic.yaml new file mode 100644 index 00000000000..7e4e91c8375 --- /dev/null +++ b/rest-api-spec/test/indices.put_alias/10_basic.yaml @@ -0,0 +1,30 @@ +--- +"Basic test for aliases": + - do: + indices.create: + index: test_index + + - do: + indices.exists_alias: + name: test_alias + + - is_false: '' + + - do: + indices.put_alias: + index: test_index + name: test_alias + + - is_true: ok + + - do: + indices.exists_alias: + name: test_alias + + - is_true: '' + + - do: + indices.get_alias: + name: test_alias + + - match: {test_index.aliases.test_alias: {}}