Skip to content

Commit

Permalink
tests: please shellcheck
Browse files Browse the repository at this point in the history
Signed-off-by: Akim Demaille <[email protected]>
  • Loading branch information
akimd committed Dec 14, 2017
1 parent 9652ca5 commit 8db887e
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions result/tests/tests.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#!/bin/sh
while ! timeout 1 bash -c "echo > /dev/tcp/vote/80"; do sleep 1; done

while ! timeout 1 bash -c "echo > /dev/tcp/vote/80"; do
sleep 1
done

curl -sS -X POST --data "vote=b" http://vote > /dev/null
sleep 10

if phantomjs render.js http://result | grep -q '1 vote'; then
echo -e "\e[42m------------"
echo -e "\e[92mTests passed"
echo -e "\e[42m------------"
echo -e "\\e[42m------------"
echo -e "\\e[92mTests passed"
echo -e "\\e[42m------------"
exit 0
fi
echo -e "\e[41m------------"
echo -e "\e[91mTests failed"
echo -e "\e[41m------------"
else
echo -e "\\e[41m------------"
echo -e "\\e[91mTests failed"
echo -e "\\e[41m------------"
exit 1
fi

0 comments on commit 8db887e

Please sign in to comment.