add http method validation on each route + add pubkey tests

This commit is contained in:
2022-11-19 15:53:31 +00:00
parent 1d2924b7ef
commit 8d3651d6fc
5 changed files with 63 additions and 8 deletions
+13 -2
View File
@@ -9,8 +9,8 @@
URL=${SIMPLE_AUTH_URL}
if [ -z ${URL} ]
then
echo "[WARN]: SIMPLE_AUTH_URL is empty, set to http://localhost:9001"
URL="http://localhost:9001"
echo "[WARN]: SIMPLE_AUTH_URL is empty, set to http://localhost:5555"
URL="http://localhost:5555"
fi
for i in {0..10}
@@ -39,3 +39,14 @@ do
exit 1
fi
done
for i in {0..10}
do
http_response=$(curl -s -o response.txt -w "%{http_code}" ${URL}/pubkey/)
if [ $http_response != "200" ]
then
echo "bad http status code : ${http_response}, expect 400"
exit 1
fi
done