forked from OKEAMAH/animated-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunPythonUnitTests.sh
More file actions
executable file
·32 lines (30 loc) · 972 Bytes
/
runPythonUnitTests.sh
File metadata and controls
executable file
·32 lines (30 loc) · 972 Bytes
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
#!/usr/bin/env bash
#python3 -m pip install -r requirements.txt
if [ ! -d _sandbox ]; then
echo We need to create it...
git clone https://github.com/algorand/sandbox.git _sandbox
cd _sandbox
git checkout 4e613dcff61523693c18584894ee6de9bd469ec1
cd ..
fi
sed -i -e 's@export ALGOD_URL=""@export ALGOD_URL="https://github.com/algorand/go-algorand"@' \
-e 's/export ALGOD_CHANNEL="stable"/export ALGOD_CHANNEL=""/' \
-e 's/export ALGOD_BRANCH=""/export ALGOD_BRANCH="v3.16.2-stable"/' \
-e 's/export INDEXER_BRANCH="master"/export INDEXER_BRANCH="2.15.4"/' \
-e 's/export INDEXER_ENABLE_ALL_PARAMETERS="false"/export INDEXER_ENABLE_ALL_PARAMETERS="true"/' _sandbox/config.dev
cd _sandbox
./sandbox clean
./sandbox up -v dev
cd ..
echo running the tests...
cd test
python3 test.py
rv=$?
echo rv = $rv
if [ $rv -ne 0 ]; then
echo tests in test.py failed
exit 1
fi
echo bringing the sandbox down...
cd ../_sandbox
./sandbox down