test: fix test script
This commit is contained in:
parent
f48d054986
commit
8d00c003a9
|
@ -8,7 +8,7 @@ set -euo pipefail
|
|||
## this is why a docker network is created, and the containers's names have a dot.
|
||||
|
||||
# ensure dir
|
||||
cd -P -- "$(dirname -- "$0")/.."
|
||||
cd -P -- "$(dirname -- "$0")/../../"
|
||||
|
||||
IMAGE1="${1}"
|
||||
IMAGE2="${2:-${IMAGE1}}"
|
||||
|
@ -94,7 +94,7 @@ backend emqx_dashboard_back
|
|||
# Must use a consistent dispatch when EMQX is running on different versions
|
||||
# because the js files for the dashboard is chunked, having the backends sharing
|
||||
# load randomly will cause the browser fail to GET some chunks (or get bad chunks if names clash)
|
||||
balance first
|
||||
balance source
|
||||
mode http
|
||||
server emqx-1 $NODE1:18083
|
||||
server emqx-2 $NODE2:18083
|
||||
|
@ -146,7 +146,7 @@ wait_for_emqx() {
|
|||
container="$1"
|
||||
wait_limit="$2"
|
||||
wait_sec=0
|
||||
while ! docker exec "$container" emqx_ctl status >/dev/null 2>&1; do
|
||||
while ! docker exec "$container" emqx ctl status; do
|
||||
wait_sec=$(( wait_sec + 1 ))
|
||||
if [ $wait_sec -gt "$wait_limit" ]; then
|
||||
echo "timeout wait for EMQX"
|
||||
|
@ -182,4 +182,4 @@ wait_for_haproxy 10
|
|||
|
||||
echo
|
||||
|
||||
docker exec $NODE1 emqx_ctl cluster join "emqx@$NODE2"
|
||||
docker exec $NODE1 emqx ctl cluster join "emqx@$NODE2"
|
||||
|
|
Loading…
Reference in New Issue