diff --git a/tests/_core/mapping.yml b/tests/_core/mapping.yml new file mode 100644 index 000000000..d91ed48b1 --- /dev/null +++ b/tests/_core/mapping.yml @@ -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