-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add missing Index API Spec Tests, Part 1 #678
Merged
Merged
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
106fd00
replication added
Tokesh e912e13
fixing lint and trying test verbose
Tokesh bd877a8
changing docker compose
Tokesh 6fd6292
Merge branch 'main' into replication-namespace
Tokesh addcd76
adding tests for replication namespace
Tokesh 638d60e
fixing lint, validate specs ci
Tokesh a6e0a87
fixing docker-compose and validate specs ci
Tokesh b012e7b
fixing validate specs ci
Tokesh 236fea7
trying to fix validate specs
Tokesh 864ee68
trying to fix validate specs v2
Tokesh 30fca51
Merge branch 'replication-namespace'
Tokesh 1d051cd
Merge branch 'main' of https://github.com/Tokesh/opensearch-api-speci…
Tokesh 9620b94
Merge branch 'opensearch-project:main' into main
Tokesh f847731
Merge remote-tracking branch 'refs/remotes/origin/main'
Tokesh 42056a6
adding not covered index api tests
Tokesh 7c7328c
Merge branch 'main' into index-tests
Tokesh 94915e9
deleting not necessary files
Tokesh cf167fd
fixing lint
Tokesh 93a58c9
fixing paths, deleting not necessary code, adding validate query api …
Tokesh 7e5570b
deleting empty file
Tokesh 1514af5
fixing minor bug in scenario
Tokesh 37b40b1
adding special folder for validation tests in indices
Tokesh d925d04
fixing path to test story schema
Tokesh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test specific field mappings endpoints. | ||
prologues: | ||
- path: /{index} | ||
method: PUT | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
director: | ||
type: text | ||
year: | ||
type: integer | ||
location: | ||
type: ip | ||
ignore_malformed: true | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Add new fields to index mapping. | ||
path: /{index}/_mapping | ||
method: POST | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
properties: | ||
genre: | ||
type: text | ||
rating: | ||
type: float | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Get specific field mappings for an index. | ||
path: /{index}/_mapping/field/{fields} | ||
method: GET | ||
parameters: | ||
index: movies | ||
fields: director,year | ||
response: | ||
status: 200 | ||
payload: | ||
movies: | ||
mappings: | ||
year: | ||
full_name: year | ||
mapping: | ||
year: | ||
type: integer | ||
director: | ||
full_name: director | ||
mapping: | ||
director: | ||
type: text |
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,36 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test endpoints relevant to the lifecycle of an index, including multi-get and multi-search operations. | ||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: books, _id: book1}} | ||
- {author: Harper Lee, title: To Kill a Mockingbird, year: 60} | ||
- {create: {_index: books, _id: book2}} | ||
- {director: Bennett Miller, title: The Cruise, year: 1998} | ||
- {create: {_index: books, _id: book3}} | ||
- {director: Nicolas Winding Refn, title: Drive, year: 1960} | ||
epilogues: | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Perform a `_msearch` request to execute multiple search queries in a single call. | ||
path: /{index}/_msearch | ||
method: POST | ||
parameters: | ||
index: books | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {index: books} | ||
- {query: {match: {title: To Kill a Mockingbird}}} | ||
- {index: books} | ||
- {query: {match: {title: The Cruise}}} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ chapters: | |
status: 200 | ||
payload: | ||
_shards: | ||
failed: 0 | ||
failed: 0 |
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,49 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test validating queries for a specific index using both GET and POST methods. | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: movies, _id: movie1}} | ||
- {director: Bennett Miller, title: The Cruise, year: 1998} | ||
- {create: {_index: movies, _id: movie2}} | ||
- {director: Nicolas Winding Refn, title: Drive, year: 1960} | ||
chapters: | ||
- synopsis: Validate a match query (GET). | ||
path: /{index}/_validate/query | ||
method: GET | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
query: | ||
match: | ||
year: 1998 | ||
response: | ||
status: 200 | ||
payload: | ||
valid: true | ||
|
||
- synopsis: Validate a match query (POST). | ||
path: /{index}/_validate/query | ||
method: POST | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
query: | ||
match: | ||
title: Drive | ||
response: | ||
status: 200 | ||
payload: | ||
valid: true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be
validate/query.yaml
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries! i'm really interested in working with OpenSearch in the form of tests or writing specs to understand it more deeply.