From c9e7e22068c32e6df82c1f4e18ed123b080869b8 Mon Sep 17 00:00:00 2001 From: dblock Date: Tue, 9 Jul 2024 10:56:57 -0400 Subject: [PATCH] Added tests for index mapping. Signed-off-by: dblock --- tests/_core/mapping.yml | 80 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 tests/_core/mapping.yml 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