mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-24 13:55:57 +00:00
Alias API tests
This commit is contained in:
parent
ac40b3a996
commit
f7c48ad616
30
rest-api-spec/test/indices.delete_alias/10_basic.yaml
Normal file
30
rest-api-spec/test/indices.delete_alias/10_basic.yaml
Normal 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
|
30
rest-api-spec/test/indices.put_alias/10_basic.yaml
Normal file
30
rest-api-spec/test/indices.put_alias/10_basic.yaml
Normal 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: {}}
|
Loading…
x
Reference in New Issue
Block a user