Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for index mapping. #390

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading