Skip to content

Commit

Permalink
adding chapter in snapshot tests
Browse files Browse the repository at this point in the history
Signed-off-by: Tokesh <[email protected]>
  • Loading branch information
Tokesh committed Dec 18, 2024
1 parent fa6c659 commit c7d77da
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added 404 response to `/_search/scroll` ([#749](https://github.com/opensearch-project/opensearch-api-specification/pull/749))
- Added `node_failures` to `DELETE /_search/scroll` and `DELETE /_search/scroll/{scroll_id}` ([#749](https://github.com/opensearch-project/opensearch-api-specification/pull/749))


### Removed
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))
- Removed unsupported `_common.mapping:DenseVectorProperty`, `_common.mapping:SparseVectorProperty`, and `_common.mapping:FlattenedProperty` ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666))
Expand Down Expand Up @@ -196,7 +195,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620).
- Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643))


### Changed

- Replaced Smithy with a native OpenAPI spec ([#189](https://github.com/opensearch-project/opensearch-api-specification/issues/189))
Expand Down
33 changes: 27 additions & 6 deletions tests/snapshot/snapshot/snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ epilogues:
parameters:
repository: my-fs-repository
snapshot: my-test-snapshot
- path: /_snapshot/{repository}/{snapshot}
method: DELETE
status: [200, 404]
parameters:
repository: my-sn-repository
snapshot: my-second-snapshot
- path: /_snapshot/{repository}
method: DELETE
status: [200, 404]
Expand Down Expand Up @@ -50,7 +56,7 @@ chapters:
location: /tmp/opensearch/repo
- synopsis: Create a snapshot.
path: /_snapshot/{repository}/{snapshot}
method: POST
method: PUT
parameters:
repository: my-fs-repository
snapshot: my-test-snapshot
Expand All @@ -65,7 +71,22 @@ chapters:
status: 200
payload:
snapshot:
snapshot: my-test-snapshot
snapshot: my-test-snapshot
- synopsis: Create a second snapshot.
path: /_snapshot/{repository}/{snapshot}
method: POST
parameters:
repository: my-sn-repository
snapshot: my-second-snapshot
wait_for_completion: true
request:
payload:
indices: '*'
response:
status: 200
payload:
snapshot:
snapshot: my-second-snapshot
- synopsis: Get information about a snapshot.
path: /_snapshot/{repository}/{snapshot}
method: GET
Expand All @@ -81,20 +102,20 @@ chapters:
path: /_snapshot/{repository}/{snapshot}
method: GET
parameters:
repository: my-fs-repository
snapshot: my-test-snapshot
repository: my-sn-repository
snapshot: my-second-snapshot
human: true
response:
status: 200
payload:
snapshots:
- snapshot: my-test-snapshot
- snapshot: my-second-snapshot
- synopsis: Delete a snapshot.
path: /_snapshot/{repository}/{snapshot}
method: DELETE
parameters:
repository: my-fs-repository
snapshot: my-test-snapshot
snapshot: my-test-snapshot
- synopsis: Delete a snapshot repository.
path: /_snapshot/{repository}
method: DELETE
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshot/snapshot/status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ epilogues:
repository: my-fs-repository
prologues:
- path: /_snapshot/{repository}
method: POST
method: PUT
parameters:
repository: my-fs-repository
request:
Expand Down

0 comments on commit c7d77da

Please sign in to comment.