From 9d59d92832420a60b9599c96f7a4b44d1193137d Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Wed, 11 Sep 2024 15:02:04 -0400 Subject: [PATCH] Added tests for _field_caps. (#567) --- tests/default/_core/field_caps.yaml | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/default/_core/field_caps.yaml diff --git a/tests/default/_core/field_caps.yaml b/tests/default/_core/field_caps.yaml new file mode 100644 index 000000000..342247e64 --- /dev/null +++ b/tests/default/_core/field_caps.yaml @@ -0,0 +1,53 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test field capabilities API. +prologues: + - path: /movies + method: PUT +epilogues: + - path: /movies + method: DELETE + status: [200, 404] +chapters: + - synopsis: Get information about the capabilities of all fields. + path: /_field_caps + method: GET + parameters: + fields: '*' + allow_no_indices: false + expand_wildcards: all + ignore_unavailable: true + include_unmapped: true + response: + status: 200 + - synopsis: Get information about the capabilities of all fields for a given index. + path: /{index}/_field_caps + method: GET + parameters: + fields: type + index: movies + response: + status: 200 + - synopsis: Get information about the capabilities of specific fields. + path: /_field_caps + method: POST + parameters: + fields: type + request: + payload: + index_filter: + match_all: {} + response: + status: 200 + - synopsis: Get information about the capabilities of all fields for a given index. + path: /{index}/_field_caps + method: POST + parameters: + fields: type + index: movies + request: + payload: + index_filter: + match_all: {} + response: + status: 200