Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shard stores API tests #715

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added missing `status` to `/_search/template` response ([#702](https://github.com/opensearch-project/opensearch-api-specification/pull/702))
- Added `_type` to `rank_eval` API specs ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704))
- Added request body to `_search_shards` API specs ([#709](https://github.com/opensearch-project/opensearch-api-specification/pull/709))
- Added NodeAttributes as additional property in `shard_stores` API specs ([#715](https://github.com/opensearch-project/opensearch-api-specification/pull/715))

### 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))
Expand Down
2 changes: 1 addition & 1 deletion spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2710,7 +2710,7 @@ components:
additionalProperties:
type: object
indices_boost:
description: Allows increasing the relevance of specific indices in the search.
description: Allows increasing the relevance of specific indexes in the search.
type: object
additionalProperties:
type: number
Expand Down
2 changes: 2 additions & 0 deletions spec/schemas/indices.shard_stores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ components:
$ref: '_common.yaml#/components/schemas/Id'
store_exception:
$ref: '#/components/schemas/ShardStoreException'
additionalProperties:
$ref: '_common.yaml#/components/schemas/NodeAttributes'
required:
- allocation
ShardStoreAllocation:
Expand Down
26 changes: 26 additions & 0 deletions tests/default/_core/shard_stores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test _shard_stores API.
prologues:
- path: /_bulk
method: POST
parameters:
refresh: true
request:
content_type: application/x-ndjson
payload:
- {create: {_index: movies, _id: movie1}}
- {director: Quentin Tarantino, title: Pulp Fiction, year: 1994}
- {create: {_index: movies, _id: movie2}}
- {director: Christopher Nolan, title: Inception, year: 2010}
epilogues:
- path: /movies
method: DELETE
status: [200, 404]

chapters:
- synopsis: Verify shard store information across all indices.
path: /_shard_stores
method: GET
response:
status: 200
28 changes: 28 additions & 0 deletions tests/default/indices/shard_stores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test _shard_stores API.
prologues:
- path: /_bulk
method: POST
parameters:
refresh: true
request:
content_type: application/x-ndjson
payload:
- {create: {_index: movies, _id: movie1}}
- {director: Quentin Tarantino, title: Pulp Fiction, year: 1994}
- {create: {_index: movies, _id: movie2}}
- {director: Christopher Nolan, title: Inception, year: 2010}
epilogues:
- path: /movies
method: DELETE
status: [200, 404]

chapters:
- synopsis: Verify shard store information for a specific index.
path: /{index}/_shard_stores
parameters:
index: movies
method: GET
response:
status: 200
Loading