Skip to content

Commit 6ed1c70

Browse files
authored
Restore "Add more yaml tests for get alias API " (#30814)
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
1 parent fbd9bb5 commit 6ed1c70

File tree

1 file changed

+44
-0
lines changed
  • rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_alias

1 file changed

+44
-0
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_alias/10_basic.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,58 @@ setup:
2020
---
2121
"Get all aliases via /_alias":
2222

23+
- do:
24+
indices.create:
25+
index: test_index_3
26+
2327
- do:
2428
indices.get_alias: {}
2529

2630
- match: {test_index.aliases.test_alias: {}}
2731
- match: {test_index.aliases.test_blias: {}}
2832
- match: {test_index_2.aliases.test_alias: {}}
2933
- match: {test_index_2.aliases.test_blias: {}}
34+
- match: {test_index_3.aliases: {}}
35+
36+
---
37+
"Get aliases via /_alias/_all":
38+
- skip:
39+
version: " - 5.99.99"
40+
reason: 5.x returns indices that have no aliases
41+
42+
- do:
43+
indices.create:
44+
index: test_index_3
45+
46+
- do:
47+
indices.get_alias:
48+
name: _all
49+
50+
- match: {test_index.aliases.test_alias: {}}
51+
- match: {test_index.aliases.test_blias: {}}
52+
- match: {test_index_2.aliases.test_alias: {}}
53+
- match: {test_index_2.aliases.test_blias: {}}
54+
- is_false: test_index_3
55+
56+
---
57+
"Get aliases via /_alias/*":
58+
- skip:
59+
version: " - 5.99.99"
60+
reason: 5.x returns indices that have no aliases
61+
62+
- do:
63+
indices.create:
64+
index: test_index_3
3065

66+
- do:
67+
indices.get_alias:
68+
name: _all
69+
70+
- match: {test_index.aliases.test_alias: {}}
71+
- match: {test_index.aliases.test_blias: {}}
72+
- match: {test_index_2.aliases.test_alias: {}}
73+
- match: {test_index_2.aliases.test_blias: {}}
74+
- is_false: test_index_3
3175

3276
---
3377
"Get all aliases via /{index}/_alias/":

0 commit comments

Comments
 (0)