Browse Source

fix(json-researcher): fix test

Add caddy boilerplate as in who-are-you_test.sh
pull/1878/head
nprimo 1 year ago committed by Dav Hojt
parent
commit
f29fa16b56
  1. 8
      sh/tests/json-researcher_test.sh

8
sh/tests/json-researcher_test.sh

@ -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

Loading…
Cancel
Save