From dd7fd9a0e4e1c3abb76cf53fb6c6d75fde144e46 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Thu, 12 Dec 2024 12:21:50 -0500 Subject: [PATCH] Added test for GET /_settings/{name}. (#727) Signed-off-by: dblock --- tests/default/_core/settings.yaml | 58 +++++++++++++++++++++++++++++ tests/default/indices/settings.yaml | 34 ----------------- 2 files changed, 58 insertions(+), 34 deletions(-) create mode 100644 tests/default/_core/settings.yaml diff --git a/tests/default/_core/settings.yaml b/tests/default/_core/settings.yaml new file mode 100644 index 000000000..919b88fcc --- /dev/null +++ b/tests/default/_core/settings.yaml @@ -0,0 +1,58 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test settings. +prologues: + - path: /movies + method: PUT + - path: /movies/_settings + method: PUT + request: + payload: + settings: + index.blocks.write: true + index: + number_of_replicas: 4 +epilogues: + - path: /movies + method: DELETE + status: [200, 404] +chapters: + - synopsis: Get settings. + distributions: + excluded: + - amazon-managed + - amazon-serverless + path: /_settings + method: GET + parameters: + allow_no_indices: true + expand_wildcards: all + flat_settings: true + include_defaults: true + ignore_unavailable: true + local: true + response: + status: 200 + - synopsis: Get settings (cluster_manager_timeout). + distributions: + excluded: + - amazon-managed + - amazon-serverless + path: /_settings + method: GET + version: '>= 2.0' + parameters: + allow_no_indices: true + expand_wildcards: all + flat_settings: true + include_defaults: true + ignore_unavailable: true + local: true + cluster_manager_timeout: 1s + response: + status: 200 + - synopsis: Get settings by name. + path: /_settings/{name} + method: GET + parameters: + name: index.number_of_replicas \ No newline at end of file diff --git a/tests/default/indices/settings.yaml b/tests/default/indices/settings.yaml index 8513ffaa6..0ac83462b 100644 --- a/tests/default/indices/settings.yaml +++ b/tests/default/indices/settings.yaml @@ -10,40 +10,6 @@ epilogues: method: DELETE status: [200, 404] chapters: - - synopsis: Get global settings. - distributions: - excluded: - - amazon-managed - - amazon-serverless - path: /_settings - method: GET - parameters: - allow_no_indices: true - expand_wildcards: all - flat_settings: true - include_defaults: true - ignore_unavailable: true - local: true - response: - status: 200 - - synopsis: Get global settings (cluster_manager_timeout). - distributions: - excluded: - - amazon-managed - - amazon-serverless - path: /_settings - method: GET - version: '>= 2.0' - parameters: - allow_no_indices: true - expand_wildcards: all - flat_settings: true - include_defaults: true - ignore_unavailable: true - local: true - cluster_manager_timeout: 1s - response: - status: 200 - synopsis: Write a setting to an index. path: /{index}/_settings method: PUT