mirror of
https://github.com/deviantony/docker-elk.git
synced 2025-12-31 18:20:01 +01:00
ci: Always search in explicit index pattern
This commit is contained in:
2
.github/workflows/scripts/run-tests-core.sh
vendored
2
.github/workflows/scripts/run-tests-core.sh
vendored
@@ -50,7 +50,7 @@ curl -X POST "http://${ip_es}:9200/_refresh" -u elastic:testpasswd \
|
||||
-s -w '\n'
|
||||
|
||||
log 'Searching message in Elasticsearch'
|
||||
response="$(curl "http://${ip_es}:9200/_count?q=message:dockerelk&pretty" -s -u elastic:testpasswd)"
|
||||
response="$(curl "http://${ip_es}:9200/logstash-*/_count?q=message:dockerelk&pretty" -s -u elastic:testpasswd)"
|
||||
echo "$response"
|
||||
count="$(jq -rn --argjson data "${response}" '$data.count')"
|
||||
if [[ $count -ne 1 ]]; then
|
||||
|
||||
@@ -32,7 +32,7 @@ declare -i count
|
||||
|
||||
# retry for max 60s (30*2s)
|
||||
for _ in $(seq 1 30); do
|
||||
response="$(curl "http://${ip_es}:9200/_search?q=docker.image:%22docker-elk_logspout%22%20AND%20message:%22logspout%20gliderlabs%22~3&pretty" -s -u elastic:testpasswd)"
|
||||
response="$(curl "http://${ip_es}:9200/logstash-*/_search?q=docker.image:%22docker-elk_logspout%22%20AND%20message:%22logspout%20gliderlabs%22~3&pretty" -s -u elastic:testpasswd)"
|
||||
|
||||
set +u # prevent "unbound variable" if assigned value is not an integer
|
||||
count="$(jq -rn --argjson data "${response}" '$data.hits.total.value')"
|
||||
|
||||
Reference in New Issue
Block a user