-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added test for GET /{index}/_refresh. Signed-off-by: dblock <[email protected]> * Added and returning . Signed-off-by: dblock <[email protected]> * Added tests for POST /{index}/_mget. Signed-off-by: dblock <[email protected]> * Fixed all refresh options to allow boolean and string. Signed-off-by: dblock <[email protected]> * Added tests for POST /_msearch. Signed-off-by: dblock <[email protected]> * Added tests for PUT /_bulk/stream. Signed-off-by: dblock <[email protected]> --------- Signed-off-by: dblock <[email protected]>
- Loading branch information
Showing
9 changed files
with
233 additions
and
16 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
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,52 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test retrieving a document source. | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
prologues: | ||
- path: /movies/_doc/1 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
title: Beauty and the Beast | ||
year: 1991 | ||
chapters: | ||
- synopsis: Retrieve the document source. | ||
path: /{index}/_source/{id} | ||
method: GET | ||
parameters: | ||
index: movies | ||
id: '1' | ||
response: | ||
status: 200 | ||
payload: | ||
title: Beauty and the Beast | ||
year: 1991 | ||
- synopsis: Retrieve a non-existent document source. | ||
path: /{index}/_source/{id} | ||
method: GET | ||
parameters: | ||
index: movies | ||
id: '2' | ||
response: | ||
status: 404 | ||
- synopsis: Check whether the document exists. | ||
path: /{index}/_source/{id} | ||
method: HEAD | ||
parameters: | ||
index: movies | ||
id: '1' | ||
response: | ||
status: 200 | ||
- synopsis: Check whether the document exists. | ||
path: /{index}/_source/{id} | ||
method: HEAD | ||
parameters: | ||
index: movies | ||
id: '2' | ||
response: | ||
status: 404 |
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,82 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test updating a document. | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
prologues: | ||
- path: /movies/_doc/1 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
title: Beauty and the Beast | ||
year: 1990 | ||
chapters: | ||
- synopsis: Update a document in the index. | ||
path: /{index}/_update/{id} | ||
method: POST | ||
parameters: | ||
index: movies | ||
id: '1' | ||
refresh: true | ||
request: | ||
payload: | ||
doc: | ||
title: Beauty and the Beast | ||
year: 1991 | ||
response: | ||
status: 200 | ||
payload: | ||
result: updated | ||
- synopsis: Update a document in the index using a script. | ||
path: /{index}/_update/{id} | ||
method: POST | ||
parameters: | ||
index: movies | ||
id: '1' | ||
request: | ||
payload: | ||
script: | ||
source: ctx._source.year += params.value | ||
lang: painless | ||
params: | ||
value: 10 | ||
response: | ||
status: 200 | ||
payload: | ||
result: updated | ||
- synopsis: Upsert a document. | ||
path: /{index}/_update/{id} | ||
method: POST | ||
parameters: | ||
index: movies | ||
id: '1' | ||
request: | ||
payload: | ||
doc: | ||
title: Drive | ||
upsert: | ||
title: Drive | ||
response: | ||
status: 200 | ||
payload: | ||
result: updated | ||
- synopsis: Upsert a document (doc_as_upsert). | ||
path: /{index}/_update/{id} | ||
method: POST | ||
parameters: | ||
index: movies | ||
id: '1' | ||
request: | ||
payload: | ||
doc: | ||
title: Drive | ||
year: 2011 | ||
doc_as_upsert: true | ||
response: | ||
status: 200 | ||
payload: | ||
result: updated |
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