fix(json-researcher): fix test

Add caddy boilerplate as in who-are-you_test.sh
This commit is contained in:
nprimo 2023-02-28 16:14:02 +01:00 committed by Dav Hojt
parent 67e754a421
commit f29fa16b56
1 changed files with 7 additions and 1 deletions

View File

@ -15,8 +15,14 @@ if [ -f ${FILENAME} ]; then
echo "echo is not allowed in this exercise!";
exit 1
fi
echo insecure >> ~/.curlrc
caddy start &>/dev/null
submitted=$(bash $FILENAME)
expected=$(bash solutions/json-researcher.sh)
caddy stop &>/dev/null
diff <(echo "$submitted") <(echo "$expected")
else
echo "The file exist but is empty"
@ -25,4 +31,4 @@ if [ -f ${FILENAME} ]; then
else
echo "File does not exist"
exit 1
fi
fi