Skip to content

Commit

Permalink
Added tests for index mapping. (#390)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Jul 10, 2024
1 parent 05d5537 commit ac9e51a
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions tests/indices/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 ac9e51a

Please sign in to comment.