Skip to content

Commit

Permalink
Added tests for index mapping.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Jul 9, 2024
1 parent ba3d715 commit c9e7e22
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions tests/_core/mapping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
$schema: ../../json_schemas/test_story.schema.yaml

description: Test mappings endpoints.
prologues:
- path: /{index}
method: PUT
parameters:
index: games
- path: /{index}
method: PUT
parameters:
index: movies
request_body:
payload:
mappings:
properties:
director:
type: text
year:
type: integer
location:
type: ip
ignore_malformed: true
epilogues:
- path: /movies,games
method: DELETE
status: [200, 404]
chapters:
- synopsis: Get mappings for an index.
path: /{index}/_mapping
method: GET
parameters:
index: movies
response:
status: 200
payload:
movies:
mappings:
properties:
director:
type: text
year:
type: integer
- synopsis: Get mappings for multiple indices.
path: /{index}/_mapping
method: GET
parameters:
index: movies,games
response:
status: 200
payload:
movies:
mappings:
properties:
director:
type: text
year:
type: integer
games:
mappings: {}
- synopsis: Update mapping for an index.
path: /{index}/_mapping
method: PUT
parameters:
index: movies
allow_no_indices: true
expand_wildcards: none
ignore_unavailable: true
cluster_manager_timeout: 1s
timeout: 10s
write_index_only: true
request_body:
payload:
properties:
producer:
type: text
response:
status: 200
payload:
acknowledged: true

0 comments on commit c9e7e22

Please sign in to comment.