From 8e07c4e572e1ba29809d891191913a019d63f8ab Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Tue, 23 Jul 2024 13:14:52 -0700 Subject: [PATCH] Replace search_shards with search API in tests (#111211) The `search_shards` API is not available in serverless. This PR replaces its usage in the newly added test with the `search` API with profiling. Relates #111123 --- .../rest-api-spec/test/nodes.stats/11_indices_metrics.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/nodes.stats/11_indices_metrics.yml b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/nodes.stats/11_indices_metrics.yml index 9948fbb04a6c7..74536e7bf0bc3 100644 --- a/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/nodes.stats/11_indices_metrics.yml +++ b/rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/nodes.stats/11_indices_metrics.yml @@ -556,10 +556,13 @@ url: type: keyword - do: - search_shards: + search: index: index1 + body: + profile: true + - set: - shards.0.0.node: node_id + profile.shards.0.node_id: node_id - do: nodes.stats: { metric: _all, level: "indices", human: true }