Skip to content

Commit 97bafb9

Browse files
authored
Wait for cluster to be green in 40_get_secrets (#117217)
Now that fast refresh searches go to search nodes instead of index nodes, the YAML test for `fleet.get_secret` sometimes fails if the shard isn't available yet on the search node before the request arrives. Addresses elasticsearch-serverless #3159, which can unmute the test once this is available.
1 parent 35116c3 commit 97bafb9

File tree

1 file changed

+6
-0
lines changed
  • x-pack/plugin/fleet/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/fleet

1 file changed

+6
-0
lines changed

x-pack/plugin/fleet/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/fleet/40_secrets_get.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
fleet.post_secret:
44
body: '{"value": "test secret"}'
55
- set: { id: id }
6+
# search node needs to be available for fleet.get_secret to work in stateless.
7+
# The `.fleet-secrets` index is created on demand, and its search replica starts out unassigned,
8+
# so wait_for_no_uninitialized_shards can miss it.
9+
- do:
10+
cluster.health:
11+
wait_for_active_shards: all
612
- do:
713
fleet.get_secret:
814
id: $id

0 commit comments

Comments
 (0)