-
Notifications
You must be signed in to change notification settings - Fork 145
/
docker-entrypoint.sh
executable file
·50 lines (41 loc) · 1.1 KB
/
docker-entrypoint.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
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
cd $(dirname $0)
case "$1" in
server)
export SYNCSERVER_SQLURI="${SYNCSERVER_SQLURI:-sqlite:///tmp/syncserver.db}"
exec gunicorn \
--bind ${HOST-0.0.0.0}:${PORT-5000} \
--forwarded-allow-ips="${SYNCSERVER_FORWARDED_ALLOW_IPS:-127.0.0.1,172.17.0.1}" \
syncserver.wsgi_app
;;
test_all)
$0 test_flake8
$0 test_nose
$0 test_functional
;;
test_flake8)
echo "test - flake8"
flake8 syncserver
;;
test_nose)
echo "test - nose"
nosetests --verbose --nocapture syncstorage.tests
;;
test_functional)
echo "test - functional"
# run functional tests
gunicorn --paste ./syncserver/tests.ini &
SERVER_PID=$!
sleep 2
$0 test_endpoint http://localhost:5000
kill $SERVER_PID
;;
test_endpoint)
exec python -m syncstorage.tests.functional.test_storage \
--use-token-server $2/token/1.0/sync/1.5
;;
*)
echo "Unknown CMD, $1"
exit 1
;;
esac