diff --git a/tests/default/_core/point_in_time/all.yaml b/tests/default/_core/point_in_time/all.yaml new file mode 100644 index 000000000..86ff71e03 --- /dev/null +++ b/tests/default/_core/point_in_time/all.yaml @@ -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 diff --git a/tests/default/_core/search/pipeline.yaml b/tests/default/_core/search/pipeline.yaml index ff14b9ae9..eab34717f 100644 --- a/tests/default/_core/search/pipeline.yaml +++ b/tests/default/_core/search/pipeline.yaml @@ -1,7 +1,7 @@ $schema: ../../../../json_schemas/test_story.schema.yaml description: Test the creation of a search pipeline. -version: '>= 2.8' +version: '>= 2.9' epilogues: - path: /_search/pipeline/empty-pipeline method: DELETE diff --git a/tests/default/_core/search/point_in_time.yaml b/tests/default/_core/search/point_in_time.yaml new file mode 100644 index 000000000..7eba25818 --- /dev/null +++ b/tests/default/_core/search/point_in_time.yaml @@ -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 diff --git a/tests/default/indices/search/point_in_time.yaml b/tests/default/indices/search/point_in_time.yaml new file mode 100644 index 000000000..c626db504 --- /dev/null +++ b/tests/default/indices/search/point_in_time.yaml @@ -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