From cfca4621991e18fca857b4c06bd7cb489d05920a Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 4 Mar 2018 12:38:41 +0100 Subject: [PATCH] More debug output --- tests/base/04-test-run_nginx.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/base/04-test-run_nginx.sh b/tests/base/04-test-run_nginx.sh index 27e385e..92f22e2 100755 --- a/tests/base/04-test-run_nginx.sh +++ b/tests/base/04-test-run_nginx.sh @@ -32,7 +32,8 @@ CONFIG_CONT="/etc/nginx/conf.d" CONTAINER="nginx:stable" FINDME="am_i_really_working" -echo "${FINDME}" > "${DOC_ROOT_HOST}/index.php" +echo " "${DOC_ROOT_HOST}/index.php" +chmod 0644 "${DOC_ROOT_HOST}/index.php" # Pull Image run "docker pull ${CONTAINER}" @@ -66,11 +67,21 @@ run "sleep 10" # Check PHP connectivity if ! run "curl -q http://localhost:${WWW_PORT}/index.php 2>&1 | grep '${FINDME}'"; then + + # Info + run "netstat -tuln" + run "curl http://localhost:${WWW_PORT}/index.php" || true + run "docker ps --no-trunc" + docker_exec "${ndid}" "nginx -t" + # Show logs docker_logs "${ndid}" || true docker_logs "${did}" || true # Ensure file is available + docker_exec "${ndid}" "ls -la ${DOC_ROOT_CONT}/" + docker_exec "${did}" "ls -la ${DOC_ROOT_CONT}/" + docker_exec "${ndid}" "cat ${DOC_ROOT_CONT}/index.php" docker_exec "${did}" "cat ${DOC_ROOT_CONT}/index.php"