From b373e8956067d38959c212f749da8fa6dd76caa1 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 4 Mar 2018 11:37:09 +0100 Subject: [PATCH] Wait for containers to be up and running --- tests/base/04-test-run_nginx.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/base/04-test-run_nginx.sh b/tests/base/04-test-run_nginx.sh index a2a0ab8..843e934 100755 --- a/tests/base/04-test-run_nginx.sh +++ b/tests/base/04-test-run_nginx.sh @@ -61,8 +61,11 @@ name="$( docker_name "${did}" )" # Start Nginx ndid="$( docker_run "${CONTAINER}" "-v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${CONFIG_HOST}:${CONFIG_CONT} -p ${WWW_PORT}:80 --link ${name}" )" +# Wait for both containers to be up and running +run "sleep 10" + # Check PHP connectivity -if ! run "curl -q 127.0.0.1:${WWW_PORT}/index.php 2>&1 | grep '${FINDME}'"; then +if ! run "curl -q localhost:${WWW_PORT}/index.php 2>&1 | grep '${FINDME}'"; then docker_logs "${ndid}" || true docker_logs "${did}" || true docker_stop "${ndid}" || true