Alias API tests

This commit is contained in:
Honza Kral 2013-07-20 20:32:44 +02:00
parent ac40b3a996
commit f7c48ad616
2 changed files with 60 additions and 0 deletions

View File

@ -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

View File

@ -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: {}}