-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add variants of indices.put_alias (#434)
* Add test for variants of indices.put_alias Signed-off-by: Thomas Farr <[email protected]> * Add specs for variants of indices.put_alias Signed-off-by: Thomas Farr <[email protected]> * Add CHANGELOG entry Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: Thomas Farr <[email protected]> Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]> Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
- Loading branch information
Showing
4 changed files
with
209 additions
and
5 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
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
2 changes: 1 addition & 1 deletion
2
tests/indices/aliases.yaml → tests/indices/aliases/aliases.yaml
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
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,79 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test put_alias variants. | ||
epilogues: | ||
- path: /test_index/_alias/test_alias* | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /test_index | ||
method: DELETE | ||
status: [200, 404] | ||
prologues: | ||
- path: /{index} | ||
method: PUT | ||
parameters: | ||
index: test_index | ||
chapters: | ||
- synopsis: Create an alias - specifying index & alias in path. | ||
path: /{index}/_alias/{name} | ||
method: PUT | ||
parameters: | ||
index: test_index | ||
name: test_alias | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
|
||
- synopsis: Create an alias - specifying index in path & alias in body. | ||
path: /{index}/_alias | ||
method: PUT | ||
parameters: | ||
index: test_index | ||
request_body: | ||
payload: | ||
alias: test_alias_1 | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
|
||
- synopsis: Create an alias - specifying index in body & alias in path. | ||
path: /_alias/{name} | ||
method: PUT | ||
parameters: | ||
name: test_alias_2 | ||
request_body: | ||
payload: | ||
index: test_index | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
|
||
- synopsis: Create an alias - specifying index & alias in body. | ||
path: /_alias | ||
method: PUT | ||
request_body: | ||
payload: | ||
index: test_index | ||
alias: test_alias_3 | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
|
||
- synopsis: Retrieve aliases | ||
path: /{index}/_alias | ||
method: GET | ||
parameters: | ||
index: test_index | ||
response: | ||
status: 200 | ||
payload: | ||
test_index: | ||
aliases: | ||
test_alias: {} | ||
test_alias_1: {} | ||
test_alias_2: {} | ||
test_alias_3: {} |