Relax result test

This commit is contained in:
Aanand Prasad 2016-06-19 11:34:14 -07:00 committed by Ben Firshman
parent d801ba9838
commit ffdd4940c6

View File

@ -1,9 +1,8 @@
#!/bin/sh #!/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=a" http://vote > /dev/null
curl -sS -X POST --data "vote=b" http://vote > /dev/null curl -sS -X POST --data "vote=b" http://vote > /dev/null
sleep 10 sleep 10
if phantomjs render.js http://result | grep -q '2 votes'; then if phantomjs render.js http://result | grep -q '1 vote'; then
echo -e "\e[42m------------" echo -e "\e[42m------------"
echo -e "\e[92mTests passed" echo -e "\e[92mTests passed"
echo -e "\e[42m------------" echo -e "\e[42m------------"