ci(ext/fleet): Probe status endpoint for readiness

This commit is contained in:
Antoine Cotten 2022-11-15 14:46:53 +01:00
parent 7d95a3f7fa
commit d0b97082cf
No known key found for this signature in database
GPG Key ID: 94637E68D4A79DD0
1 changed files with 5 additions and 4 deletions

View File

@ -8,15 +8,16 @@ source "$(dirname ${BASH_SOURCE[0]})/lib/testing.sh"
cid_es="$(container_id elasticsearch)" cid_es="$(container_id elasticsearch)"
cid_fl="$(container_id fleet-server)"
ip_es="$(service_ip elasticsearch)" ip_es="$(service_ip elasticsearch)"
ip_fl="$(service_ip fleet-server)"
log 'Waiting for readiness of Elasticsearch' log 'Waiting for readiness of Elasticsearch'
poll_ready "$cid_es" "http://${ip_es}:9200/" -u 'elastic:testpasswd' poll_ready "$cid_es" "http://${ip_es}:9200/" -u 'elastic:testpasswd'
# Fleet-managed Elastic Agent does not expose a liveness endpoint. log 'Waiting for readiness of Fleet Server'
# Wait for the existence of the metrics index instead. poll_ready "$cid_fl" "http://${ip_fl}:8220/api/status"
log 'Waiting for creation of metrics index in Elasticsearch'
poll_ready "$cid_es" "http://${ip_es}:9200/metrics-system.cpu-default" -u 'elastic:testpasswd'
# We expect to find metrics entries using the following query: # We expect to find metrics entries using the following query:
# #