Skip to content

Commit

Permalink
Added missing _search/point_in_time tests.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Dec 13, 2024
1 parent 19e3239 commit f746863
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/default/_core/point_in_time/all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test point-in-time.
version: '>= 2.4'
epilogues:
- path: /_search/point_in_time/_all
method: DELETE
- 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}}
- {title: The Cruise, year: 1998}
- {create: {_index: movies}}
- {title: Drive, year: 1960}
- path: /movies/_search/point_in_time
method: POST
parameters:
keep_alive: 1m
chapters:
- synopsis: Get all point in time.
path: /_search/point_in_time/_all
method: GET
- synopsis: Delete all point in time.
path: /_search/point_in_time/_all
method: DELETE
37 changes: 37 additions & 0 deletions tests/default/_core/search/point_in_time.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test point-in-time.
version: '>= 2.4'
epilogues:
- path: /_search/point_in_time/_all
method: DELETE
- 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}}
- {title: The Cruise, year: 1998}
- {create: {_index: movies}}
- {title: Drive, year: 1960}
- path: /movies/_search/point_in_time
id: pit
method: POST
parameters:
keep_alive: 1m
output:
id: payload.pit_id
chapters:
- synopsis: Delete all pits.
path: /_search/point_in_time
request:
payload:
pit_id:
- ${pit.id}
method: DELETE
30 changes: 30 additions & 0 deletions tests/default/indices/search/point_in_time.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test point-in-time.
version: '>= 2.4'
epilogues:
- path: /_search/point_in_time/_all
method: DELETE
- 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}}
- {title: The Cruise, year: 1998}
- {create: {_index: movies}}
- {title: Drive, year: 1960}
chapters:
- synopsis: Create a point in time.
path: /{index}/_search/point_in_time
method: POST
parameters:
index:
- movies
keep_alive: 1m

0 comments on commit f746863

Please sign in to comment.