Skip to content

Commit

Permalink
Added a test for GET /_search/pipeline and DELETE /_search/pipeline/{…
Browse files Browse the repository at this point in the history
…id}.

Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Dec 13, 2024
1 parent 9fd6010 commit 19e3239
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
33 changes: 33 additions & 0 deletions tests/default/_core/search/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test the creation of a search pipeline.
version: '>= 2.8'
epilogues:
- path: /_search/pipeline/empty-pipeline
method: DELETE
status: [200, 404]
chapters:
- synopsis: Create search pipeline.
path: /_search/pipeline/{id}
method: PUT
parameters:
id: empty-pipeline
request:
payload: {}
response:
status: 200
payload:
acknowledged: true
- synopsis: Query all pipelines.
path: /_search/pipeline
method: GET
- synopsis: Query created pipeline.
path: /_search/pipeline/{id}
method: GET
parameters:
id: empty-pipeline
- synopsis: Delete created pipeline.
path: /_search/pipeline/{id}
method: DELETE
parameters:
id: empty-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ prologues:
name: Drive
status: [201]
epilogues:
- path: /_search/pipeline/names_pipeline
- path: /_search/pipeline/rename-field
method: DELETE
status: [200, 404]
- path: /movies
Expand All @@ -24,7 +24,7 @@ chapters:
path: /_search/pipeline/{id}
method: PUT
parameters:
id: names_pipeline
id: rename-field
request:
payload:
response_processors:
Expand All @@ -35,21 +35,14 @@ chapters:
status: 200
payload:
acknowledged: true
- synopsis: Query created pipeline.
path: /_search/pipeline/{id}
method: GET
parameters:
id: names_pipeline
response:
status: 200
- synopsis: Search.
warnings:
multiple-paths-detected: false
path: /{index}/_search
method: GET
parameters:
index: movies
search_pipeline: names_pipeline
search_pipeline: rename-field
response:
status: 200
payload:
Expand Down
1 change: 0 additions & 1 deletion tests/default/indices/search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ chapters:
payload:
query:
match_all: {}

0 comments on commit 19e3239

Please sign in to comment.