forked from makerdao/auction-keeper
-
Notifications
You must be signed in to change notification settings - Fork 6
/
test.sh
executable file
·39 lines (31 loc) · 1007 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
#CONFIG="testchain-value-english-governance-median-multisig-basic"
#CONFIG="testchain-value-fixed-discount-governance-median-multisig-basic"
export TESTCHAIN="rai-testchain-value-fixed-discount-uniswap-multisig-safe"
while getopts :c:f: option
do
case "${option}"
in
c) export TESTCHAIN=${OPTARG};;
f) TEST_FILE=${OPTARG};;
esac
done
# Pull the docker image
docker pull reflexer/${TESTCHAIN}
pushd ./lib/pyflex
# Stop any existing containers
docker-compose -f config/${TESTCHAIN}.yml down
# Start the docker image and wait for parity to initialize
docker-compose -f config/${TESTCHAIN}.yml up -d
sleep 2
popd
PYTHONPATH=$PYTHONPATH:./lib/pygasprice-client:./lib/pyflex:./lib/pyexchange py.test \
--cov=auction_keeper --cov-report=term --cov-append \
--log-format="%(asctime)s %(levelname)s %(message)s" --log-date-format="%H:%M:%S" \
tests/${TEST_FILE}
TEST_RESULT=$?
echo Stopping container
pushd ./lib/pyflex
docker-compose -f config/${TESTCHAIN}.yml down
popd
exit $TEST_RESULT