From 552e5e4366c2429a58ec91bf10c466d8dffde9c4 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Thu, 24 Oct 2024 16:58:26 -0400 Subject: [PATCH] Adds tests for /_remote/info and _script_context. (#637) * tests/default/_core/ refresh, remote_info and script_context Signed-off-by: Bruno Lloret Signed-off-by: dblock Co-authored-by: Bruno Lloret --- tests/default/_core/refresh.yaml | 10 +++++++++ tests/default/_core/remote/info.yaml | 27 +++++++++++++++++++++++++ tests/default/_core/script_context.yaml | 10 +++++++++ tests/default/indices/refresh.yaml | 5 ----- 4 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 tests/default/_core/refresh.yaml create mode 100644 tests/default/_core/remote/info.yaml create mode 100644 tests/default/_core/script_context.yaml diff --git a/tests/default/_core/refresh.yaml b/tests/default/_core/refresh.yaml new file mode 100644 index 000000000..5a4a42f74 --- /dev/null +++ b/tests/default/_core/refresh.yaml @@ -0,0 +1,10 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test _refresh. + +chapters: + - synopsis: Refresh all indices in the cluster. + path: /_refresh + method: GET + response: + status: 200 diff --git a/tests/default/_core/remote/info.yaml b/tests/default/_core/remote/info.yaml new file mode 100644 index 000000000..708439460 --- /dev/null +++ b/tests/default/_core/remote/info.yaml @@ -0,0 +1,27 @@ +$schema: ../../../../json_schemas/test_story.schema.yaml + +description: Test _remote/info. + +prologues: + - method: PUT + path: /_cluster/settings + request: + payload: + transient: + cluster.remote: + cluster2: + seeds: + - localhost:4242 +chapters: + - synopsis: Retrieve information about remote clusters. + path: /_remote/info + method: GET + response: + status: 200 +epilogues: + - method: PUT + path: /_cluster/settings + request: + payload: + transient: + cluster.remote.cluster2.seeds: [] diff --git a/tests/default/_core/script_context.yaml b/tests/default/_core/script_context.yaml new file mode 100644 index 000000000..bcb842edb --- /dev/null +++ b/tests/default/_core/script_context.yaml @@ -0,0 +1,10 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test the _script_context endpoint to retrieve available script contexts. + +chapters: + - synopsis: Retrieve available script contexts. + path: /_script_context + method: GET + response: + status: 200 \ No newline at end of file diff --git a/tests/default/indices/refresh.yaml b/tests/default/indices/refresh.yaml index 2303ed287..eb8f69057 100644 --- a/tests/default/indices/refresh.yaml +++ b/tests/default/indices/refresh.yaml @@ -14,11 +14,6 @@ prologues: year: 1991 status: [201] chapters: - - synopsis: Refresh. - path: /_refresh - method: POST - response: - status: 200 - synopsis: Refresh an index. path: /{index}/_refresh method: POST