-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathtest_run.sh
More file actions
executable file
·39 lines (31 loc) · 887 Bytes
/
test_run.sh
File metadata and controls
executable file
·39 lines (31 loc) · 887 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
33
34
35
36
37
38
39
#!/bin/bash
function wait_for {
local command="$*"
echo "wait_for '${command}'"
for i in $(seq 1 1000); do
if ${command}; then
echo "wait_for '${command}' complete"
return
fi
sleep 0.2
done
echo "wait_for '${command}' timed out"
exit 1
}
wait_for nc -z db2 3306
wait_for nc -z ${APIGATEWAY} 80
wait_for nc -z admin 80
wait_for nc -z public 80
wait_for nc -z selenium 4444
wait_for curl --silent --fail --output /dev/null http://${APIGATEWAY}:80/webshop/product_data
if [ -z "${TEST_PARALELLISM}" ]; then
TEST_PARALELLISM="auto"
fi
set -e
set -x
rm -rf /work/.test/selenium-screenshots
cd /work/src
if [ -n "$WAIT_FOR_DEBUGGER" ]; then
wait_for_debugger_flags="-m debugpy --listen 0.0.0.0:5678 --wait-for-client"
fi
python3 $wait_for_debugger_flags -m pytest --color=yes . -n ${TEST_PARALELLISM} -ra