mirror of
https://github.com/deviantony/docker-elk.git
synced 2025-12-25 07:12:13 +01:00
ci: Check for readiness of Logstash in Logspout test
Since we restart Logstash to enable the UDP input prior to running this test, we should also ensure it has successfully come back, otherwise we start searching for the expected documents in Elasticsearch way too early and often run into timeouts.
This commit is contained in:
11
.github/workflows/scripts/run-tests-logspout.sh
vendored
11
.github/workflows/scripts/run-tests-logspout.sh
vendored
@@ -8,16 +8,21 @@ source "$(dirname ${BASH_SOURCE[0]})/lib/testing.sh"
|
||||
|
||||
|
||||
cid_es="$(container_id elasticsearch)"
|
||||
cid_ls="$(container_id logspout)"
|
||||
cid_ls="$(container_id logstash)"
|
||||
cid_lsp="$(container_id logspout)"
|
||||
|
||||
ip_es="$(service_ip elasticsearch)"
|
||||
ip_ls="$(service_ip logspout)"
|
||||
ip_ls="$(service_ip logstash)"
|
||||
ip_lsp="$(service_ip logspout)"
|
||||
|
||||
log 'Waiting for readiness of Elasticsearch'
|
||||
poll_ready "$cid_es" "http://${ip_es}:9200/" -u 'elastic:testpasswd'
|
||||
|
||||
log 'Waiting for readiness of Logstash'
|
||||
poll_ready "$cid_ls" "http://${ip_ls}:9600/_node/pipelines/main?pretty"
|
||||
|
||||
log 'Waiting for readiness of Logspout'
|
||||
poll_ready "$cid_ls" "http://${ip_ls}/health"
|
||||
poll_ready "$cid_lsp" "http://${ip_lsp}/health"
|
||||
|
||||
# When Logspout starts, it prints the following log line:
|
||||
# 2021/01/07 16:14:52 # logspout v3.2.13-custom by gliderlabs
|
||||
|
||||
Reference in New Issue
Block a user