Be more verbose during test startup

This commit is contained in:
cytopia 2022-03-18 15:00:45 +01:00
parent 218ed79e14
commit d4b0be9ac4
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2

View File

@ -34,6 +34,8 @@ fi
### ###
HOST_PORT_HTTPD="$( "${SCRIPT_PATH}/env-getvar.sh" "HOST_PORT_HTTPD" )" HOST_PORT_HTTPD="$( "${SCRIPT_PATH}/env-getvar.sh" "HOST_PORT_HTTPD" )"
MYSQL_ROOT_PASSWORD="$( "${SCRIPT_PATH}/env-getvar.sh" "MYSQL_ROOT_PASSWORD" )" MYSQL_ROOT_PASSWORD="$( "${SCRIPT_PATH}/env-getvar.sh" "MYSQL_ROOT_PASSWORD" )"
PHP_SERVER="$( "${SCRIPT_PATH}/env-getvar.sh" "PHP_SERVER" )"
HTTPD_SERVER="$( "${SCRIPT_PATH}/env-getvar.sh" "HTTPD_SERVER" )"
### ###
@ -62,6 +64,9 @@ until curl -sS -I --fail -o /dev/null -w "%{http_code}" "http://localhost:${HOST
run "docker-compose exec -T --user devilbox php curl -sS -v 'http://localhost/'" "1" "${DVLBOX_PATH}" || true run "docker-compose exec -T --user devilbox php curl -sS -v 'http://localhost/'" "1" "${DVLBOX_PATH}" || true
run "docker-compose exec -T --user devilbox php curl -sS -I 'http://localhost/'" "1" "${DVLBOX_PATH}" || true run "docker-compose exec -T --user devilbox php curl -sS -I 'http://localhost/'" "1" "${DVLBOX_PATH}" || true
run "docker-compose exec -T --user devilbox php curl -sS -I -o /dev/null -w '%{http_code}' 'http://localhost/'" "1" "${DVLBOX_PATH}" || true run "docker-compose exec -T --user devilbox php curl -sS -I -o /dev/null -w '%{http_code}' 'http://localhost/'" "1" "${DVLBOX_PATH}" || true
run "cd ${DVLBOX_PATH} && docker-compose logs" || true
run "cat ${DVLBOX_PATH}/log/php-fpm-${PHP_SERVER}/php-fpm.error" || true
run "cat ${DVLBOX_PATH}/log/${HTTPD_SERVER}/defaultlocalhost-error.log" || true
exit 1 exit 1
fi fi
@ -83,6 +88,9 @@ until curl -sS --fail "http://localhost:${HOST_PORT_HTTPD}" 2>/dev/null | grep '
printf "[FAIL]\\n" printf "[FAIL]\\n"
curl -sS -v "http://localhost:${HOST_PORT_HTTPD}" curl -sS -v "http://localhost:${HOST_PORT_HTTPD}"
curl -sS -I "http://localhost:${HOST_PORT_HTTPD}" curl -sS -I "http://localhost:${HOST_PORT_HTTPD}"
run "cd ${DVLBOX_PATH} && docker-compose logs" || true
run "cat ${DVLBOX_PATH}/log/php-fpm-${PHP_SERVER}/php-fpm.error" || true
run "cat ${DVLBOX_PATH}/log/${HTTPD_SERVER}/defaultlocalhost-error.log" || true
exit 1 exit 1
fi fi
@ -114,7 +122,10 @@ until cd "${DVLBOX_PATH}" && docker-compose exec -T php mongofiles --host=mongo
i=$(( i + 1 )) i=$(( i + 1 ))
if [ "${i}" -eq "60" ]; then if [ "${i}" -eq "60" ]; then
printf "[FAIL]\\n" printf "[FAIL]\\n"
cd "${DVLBOX_PATH}" && docker-compose exec -T php mongofiles --host=mongo list cd "${DVLBOX_PATH}" && docker-compose exec -T php mongofiles --host=mongo list || true
run "cd ${DVLBOX_PATH} && docker-compose logs" || true
run "cat ${DVLBOX_PATH}/log/php-fpm-${PHP_SERVER}/php-fpm.error" || true
run "cat ${DVLBOX_PATH}/log/${HTTPD_SERVER}/defaultlocalhost-error.log" || true
exit 1 exit 1
fi fi
@ -134,7 +145,10 @@ until cd "${DVLBOX_PATH}" && docker-compose exec -T php mysql --user=root --pass
i=$(( i + 1 )) i=$(( i + 1 ))
if [ "${i}" -eq "60" ]; then if [ "${i}" -eq "60" ]; then
printf "[FAIL]\\n" printf "[FAIL]\\n"
cd "${DVLBOX_PATH}" && docker-compose exec -T php mysql --user=root --password="${MYSQL_ROOT_PASSWORD}" --host=mysql -e 'show databases;' cd "${DVLBOX_PATH}" && docker-compose exec -T php mysql --user=root --password="${MYSQL_ROOT_PASSWORD}" --host=mysql -e 'show databases;' || true
run "cd ${DVLBOX_PATH} && docker-compose logs" || true
run "cat ${DVLBOX_PATH}/log/php-fpm-${PHP_SERVER}/php-fpm.error" || true
run "cat ${DVLBOX_PATH}/log/${HTTPD_SERVER}/defaultlocalhost-error.log" || true
exit 1 exit 1
fi fi
@ -154,7 +168,10 @@ until cd "${DVLBOX_PATH}" && docker-compose exec -T php pg_isready --host=pgsql
i=$(( i + 1 )) i=$(( i + 1 ))
if [ "${i}" -eq "60" ]; then if [ "${i}" -eq "60" ]; then
printf "[FAIL]\\n" printf "[FAIL]\\n"
cd "${DVLBOX_PATH}" && docker-compose exec -T php pg_isready --host=pgsql cd "${DVLBOX_PATH}" && docker-compose exec -T php pg_isready --host=pgsql || true
run "cd ${DVLBOX_PATH} && docker-compose logs" || true
run "cat ${DVLBOX_PATH}/log/php-fpm-${PHP_SERVER}/php-fpm.error" || true
run "cat ${DVLBOX_PATH}/log/${HTTPD_SERVER}/defaultlocalhost-error.log" || true
exit 1 exit 1
fi fi