Skip to content

Commit

Permalink
Added tests for missing alias/aliases combinations. (#664)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock authored Nov 12, 2024
1 parent ed5e83c commit fce5721
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
27 changes: 26 additions & 1 deletion tests/default/indices/alias/alias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,28 @@ prologues:
index: games
chapters:
- synopsis: Create an alias.
path: /{index}/_alias/{name}
method: POST
parameters:
index: games
name: jeux
- synopsis: Update an alias.
path: /{index}/_alias/{name}
method: PUT
parameters:
index: games
name: jeux
- synopsis: Get all aliases from an index.
method: GET
path: /{index}/_alias
parameters:
index: games
response:
status: 200
payload:
games:
aliases:
jeux: {}
- synopsis: Get an alias from index.
method: GET
path: /{index}/_alias/{name}
Expand All @@ -25,7 +42,6 @@ chapters:
name: jeux
response:
status: 200
content_type: application/json
payload:
games:
aliases:
Expand All @@ -42,6 +58,15 @@ chapters:
parameters:
index: games
name: jeux
- synopsis: Update an alias.
path: /{index}/_alias
method: PUT
parameters:
index: games
request:
payload:
alias: jeux
is_write_index: false
- synopsis: Check if alias exists.
path: /{index}/_alias/{name}
method: HEAD
Expand Down
11 changes: 10 additions & 1 deletion tests/default/indices/aliases/aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@ prologues:
- path: games
method: PUT
chapters:
- synopsis: Create an alias.
- synopsis: Create an alias by name.
path: /{index}/_aliases/{name}
method: PUT
parameters:
index: games
name: jeux
- synopsis: Update an alias.
path: /{index}/_aliases
method: PUT
parameters:
index: games
request:
payload:
alias: jeux
is_write_index: false
- synopsis: Delete an alias.
path: /{index}/_aliases/{name}
method: DELETE
Expand Down

0 comments on commit fce5721

Please sign in to comment.