Skip to content
Snippets Groups Projects
Verified Commit 150769e6 authored by Jan Mojžíš's avatar Jan Mojžíš
Browse files

d/t update

parent 92b21fee
No related branches found
No related tags found
No related merge requests found
Tests: helloworld
Tests: generic
Restrictions: allow-stderr isolation-container needs-root
Depends: curl,
nginx,
......
#!/bin/sh
set -e
# generic test that only verifies that nginx is running with the given
# libnginx-... module
cat <<EOF > "/etc/nginx/sites-enabled/default"
server {
listen 80 default_server;
location /helloworld {
location /generic {
return 200;
}
}
EOF
exp="response_code: 200"
nginx -t
invoke-rc.d nginx restart || { journalctl -n all -xu nginx.service; exit 1; }
out=`curl --fail -w "response_code: %{http_code}\n" http://127.0.0.1/helloworld`
if [ x"${out}" != x"${exp}" ]; then
echo "output:"
echo "====================="
echo "${out}"
echo "====================="
echo "expected output:"
echo "====================="
echo "${exp}"
echo "====================="
exit 1
fi
curl --fail -w "response_code: %{http_code}\n" http://127.0.0.1/generic
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment