-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix snapshot restore and recovery endpoint (#611)
* fix snapshot restore and recovery endpoint Signed-off-by: Tatsuya Kawakami <[email protected]> * add changelog Signed-off-by: Tatsuya Kawakami <[email protected]> * Fixed index naming, description and changelog Signed-off-by: Tatsuya Kawakami <[email protected]> --------- Signed-off-by: Tatsuya Kawakami <[email protected]>
- Loading branch information
Showing
4 changed files
with
114 additions
and
3 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
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,101 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test _snapshot/{repository}/{snapshot}/_restore endpoints. | ||
epilogues: | ||
- path: /_snapshot/{repository}/{snapshot} | ||
method: DELETE | ||
status: [200, 404] | ||
parameters: | ||
repository: my-fs-repository | ||
snapshot: my-test-snapshot | ||
- path: /_snapshot/{repository} | ||
method: DELETE | ||
status: [200, 404] | ||
parameters: | ||
repository: my-fs-repository | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
prologues: | ||
- path: /_snapshot/{repository} | ||
method: PUT | ||
parameters: | ||
repository: my-fs-repository | ||
request: | ||
payload: | ||
type: fs | ||
settings: | ||
location: /tmp/opensearch/repo | ||
- path: /movies | ||
method: PUT | ||
- path: /books | ||
method: PUT | ||
- path: /_snapshot/{repository}/{snapshot} | ||
method: PUT | ||
parameters: | ||
repository: my-fs-repository | ||
snapshot: my-test-snapshot | ||
wait_for_completion: true | ||
request: | ||
payload: | ||
indices: | ||
- books | ||
- movies | ||
ignore_unavailable: true | ||
include_global_state: false | ||
partial: true | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Restore snapshot with wait_for_completion true. | ||
path: /_snapshot/{repository}/{snapshot}/_restore | ||
method: POST | ||
parameters: | ||
repository: my-fs-repository | ||
snapshot: my-test-snapshot | ||
wait_for_completion: true | ||
request: | ||
payload: | ||
indices: movies | ||
response: | ||
status: 200 | ||
payload: | ||
snapshot: | ||
snapshot: my-test-snapshot | ||
- synopsis: Restore snapshot with wait_for_completion false. | ||
path: /_snapshot/{repository}/{snapshot}/_restore | ||
method: POST | ||
parameters: | ||
repository: my-fs-repository | ||
snapshot: my-test-snapshot | ||
wait_for_completion: false | ||
request: | ||
payload: | ||
indices: books | ||
response: | ||
status: 200 | ||
payload: | ||
accepted: true | ||
- synopsis: Wait finish async restore. | ||
path: /{index}/_recovery | ||
warnings: | ||
multiple-paths-detected: false | ||
method: GET | ||
parameters: | ||
index: books | ||
response: | ||
status: 200 | ||
payload: | ||
books: | ||
shards: | ||
- stage: DONE | ||
type: SNAPSHOT | ||
retry: | ||
count: 3 |