refactor tests for truffle 3

This commit is contained in:
Manuel Araoz
2017-02-17 18:03:52 -03:00
parent 7e7193ae61
commit 9bd51db2b2
17 changed files with 249 additions and 289 deletions

View File

@ -1,7 +1,13 @@
#! /bin/bash
testrpc &
trpc_pid=$!
output=$(nc -z localhost 8545; echo $?)
[ $output -eq "0" ] && trpc_running=true
if [ ! $trpc_running ]; then
echo "Starting our own testrpc node instance"
testrpc > /dev/null &
trpc_pid=$!
fi
truffle test
kill -9 $trpc_pid
if [ ! $trpc_running ]; then
kill -9 $trpc_pid
fi