Commit a8dbae90 authored by Johannes Meyer's avatar Johannes Meyer

start_test.sh: Properly test the server's response

parent a73eb5ac
Pipeline #9470 failed with stages
in 8 minutes and 11 seconds
......@@ -6,12 +6,31 @@ if ! $SCRIPT_HOME/prepare_test.sh; then
exit 1
fi
RSTATUS=$(curl -s -w "%{http_code}" http://localhost/icingaweb2/authentication/login -o /dev/null)
if [ "200" != "$RSTATUS" ]; then
echo "Http exit code was not ok!"
exit 1
sleep 10
output=`mktemp`
if curl -v http://127.0.0.1/icingaweb2/authentication/login -o "$output"; then
if grep -q '<div id="login"' "$output"; then
echo "Login page available"
exit 0
else
echo "Didn't get a logon page from the webserver!"
echo
echo "Output of the page is:"
echo "====================================="
cat "$output"
exit 1
fi
else
echo "All's well"
exit 0
echo "Request for login page failed!"
echo
echo "Output of the page is:"
echo "====================================="
cat "$output"
echo "====================================="
sudo sh -ex <<<'cat /var/log/httpd/*error* /var/log/apache2/*error*'
exit 1
fi
# vi: ts=2 sw=2 expandtab :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment