forked from elastic/elasticsearch
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consistent Indices API: Added tests to make sure requests on aliases …
…return the concrete index Relates elastic#4071
- Loading branch information
Showing
3 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
"Getting mapping for aliases should return the real index as key": | ||
|
||
- do: | ||
indices.create: | ||
index: test_index | ||
body: | ||
mappings: | ||
test_type: | ||
properties: | ||
text: | ||
type: string | ||
analyzer: whitespace | ||
|
||
- do: | ||
indices.put_alias: | ||
index: test_index | ||
name: test_alias | ||
|
||
- do: | ||
indices.get_mapping: | ||
index: test_alias | ||
|
||
- match: {test_index.test_type.properties.text.type: string} | ||
- match: {test_index.test_type.properties.text.analyzer: whitespace} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
"Getting settings for aliases should return the real index as key": | ||
|
||
- do: | ||
indices.create: | ||
index: test-index | ||
body: | ||
settings: | ||
index: | ||
refresh_interval: -1 | ||
number_of_shards: 2 | ||
number_of_replicas: 3 | ||
|
||
- do: | ||
indices.put_alias: | ||
index: test-index | ||
name: test-alias | ||
|
||
- do: | ||
indices.get_settings: | ||
index: test-alias | ||
|
||
- match: { test-index.settings.index.number_of_replicas: "3" } | ||
- match: { test-index.settings.index.number_of_shards: "2" } | ||
- match: { test-index.settings.index.refresh_interval: "-1" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
"Getting warmer for aliases should return the real index as key": | ||
|
||
- do: | ||
indices.create: | ||
index: test_index | ||
|
||
- do: | ||
cluster.health: | ||
wait_for_status: yellow | ||
|
||
- do: | ||
indices.put_warmer: | ||
index: test_index | ||
name: test_warmer | ||
body: | ||
query: | ||
match_all: {} | ||
|
||
- do: | ||
indices.put_alias: | ||
index: test_index | ||
name: test_alias | ||
|
||
- do: | ||
indices.get_warmer: | ||
index: test_alias | ||
|
||
- match: {test_index.warmers.test_warmer.source.query.match_all: {}} | ||
|