mirror of
https://github.com/thib8956/nginx-proxy
synced 2024-11-22 03:46:29 +00:00
tests: fix minor bug in docker_wait_for_log
This commit is contained in:
parent
b4d1acbf2d
commit
865b14e029
@ -33,15 +33,14 @@ function docker_assert_log {
|
|||||||
assert_output -p "$*"
|
assert_output -p "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
# wait for container $2 to contain a given text in its log
|
# wait for a container to produce a given text in its log
|
||||||
# $1 container
|
# $1 container
|
||||||
# $2 timeout in second
|
# $2 timeout in second
|
||||||
# $* text to wait for
|
# $* text to wait for
|
||||||
function docker_wait_for_log {
|
function docker_wait_for_log {
|
||||||
local -r container=$1
|
local -r container=$1
|
||||||
shift
|
local -ir timeout_sec=$2
|
||||||
local -ir timeout_sec=$1
|
shift 2
|
||||||
shift
|
|
||||||
retry $(( $timeout_sec * 2 )) .5s docker_assert_log $container "$*"
|
retry $(( $timeout_sec * 2 )) .5s docker_assert_log $container "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user