-
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.
Signed-off-by: Theo Truong <[email protected]>
- Loading branch information
Showing
2 changed files
with
88 additions
and
4 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,84 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
skip: false | ||
description: This story tests all endpoints relevant the lifecycle of an index, from creation to deletion. | ||
epilogues: | ||
- path: /books,movies,games | ||
method: DELETE | ||
ignore_errors: false | ||
chapters: | ||
- synopsis: Create an index named `books` with mappings and settings. | ||
path: /{index} | ||
method: PUT | ||
parameters: | ||
index: books | ||
request_body: | ||
payload: | ||
mappings: | ||
properties: | ||
name: | ||
type: keyword | ||
age: | ||
type: integer | ||
settings: | ||
number_of_shards: 5 | ||
number_of_replicas: 2 | ||
response: | ||
status: 200 | ||
|
||
- synopsis: Create an index named `games` with default settings, | ||
path: /{index} | ||
method: PUT | ||
parameters: | ||
index: games | ||
response: | ||
status: 200 | ||
|
||
- synopsis: Check if the index `books` exists. It should. | ||
path: /{index} | ||
method: HEAD | ||
parameters: | ||
index: books | ||
response: | ||
status: 200 | ||
|
||
- synopsis: Check if the index `movies` exists. It should not. | ||
path: /{index} | ||
method: HEAD | ||
parameters: | ||
index: movies | ||
response: | ||
status: 404 | ||
|
||
- synopsis: Retrieve the mappings and settings of the `books` and `games` indices. | ||
path: /{index} | ||
method: GET | ||
parameters: | ||
index: books,games | ||
flat_settings: true | ||
response: | ||
status: 200 | ||
|
||
- synopsis: Close the `books` index. | ||
path: /{index}/_close | ||
method: POST | ||
parameters: | ||
index: books | ||
response: | ||
status: 200 | ||
|
||
- synopsis: Open the `books` index. | ||
path: /{index}/_open | ||
method: POST | ||
parameters: | ||
index: books | ||
response: | ||
status: 200 | ||
|
||
- synopsis: Delete the `books` and `games` indices. | ||
path: /{index} | ||
method: DELETE | ||
parameters: | ||
index: books,games | ||
response: | ||
status: 200 |
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