mirror of
https://github.com/peeringdb/peeringdb.git
synced 2024-05-11 05:55:09 +00:00
* remove log file writing from migration * run tests on mysql * fix tests (pt.1) * fix tests (pt.2) * fix all user_id errors in tests * Fix geocode typo * More test changes for mysql id issues * Add coverage config that defines coverage db should go inside test folder * update docs * fix mysql user * fix tests cli * add mysql collate settings * docs * fix sync * fix sync * docs * remove debug output * remove XXX * interim commit to move to dev box * mv db local, rm after run * updates for 724 * note layer error message and work around * fix travis * chown tests * more travis fixes * travis: touch Ctl/dev/.env * write coverage report to ./coverage * clean up docs * formatting Co-authored-by: Stefan Pratter <stefan@20c.com> Co-authored-by: Elliot Frank <elliot@20c.com>
56 lines
1.1 KiB
Bash
Executable File
56 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
|
|
function migrate() {
|
|
echo applying migrations - django_peeringdb
|
|
# always fake, since peeeringdb_server does not use concrete models
|
|
manage migrate django_peeringdb --fake
|
|
echo applying all migrations
|
|
manage migrate
|
|
}
|
|
|
|
|
|
cd /srv/www.peeringdb.com
|
|
|
|
case "$1" in
|
|
"uwsgi" )
|
|
echo starting uwsgi
|
|
if [[ "$PDB_NO_MIGRATE" == "" ]]; then
|
|
migrate
|
|
fi
|
|
exec venv/bin/uwsgi --ini etc/django-uwsgi.ini
|
|
;;
|
|
"migrate" )
|
|
migrate
|
|
;;
|
|
"inetd" )
|
|
inetd -f -e -q 1024
|
|
;;
|
|
"in.whois" )
|
|
exec ./in.whoisd
|
|
;;
|
|
"run_tests" )
|
|
source venv/bin/activate
|
|
export DJANGO_SETTINGS_MODULE=mainsite.settings
|
|
export DATABASE_USER=root
|
|
export DATABASE_PASSWORD=""
|
|
export RELEASE_ENV=run_tests
|
|
pytest -v -rA --cov-report term-missing --cov=peeringdb_server --durations=0 tests/
|
|
;;
|
|
"whois" )
|
|
line=$(head -1 | tr -cd '[:alnum:]._-')
|
|
exec manage pdb_whois "$line"
|
|
;;
|
|
"/bin/sh" )
|
|
echo dropping to shell
|
|
exec /bin/sh
|
|
;;
|
|
"makemessages" | "compilemessages" )
|
|
cd /mnt
|
|
exec django-admin $@
|
|
;;
|
|
* )
|
|
exec manage $@
|
|
;;
|
|
esac
|