Files @ 45a281a0f36f
Branch filter:

Location: kallithea/kallithea/tests/scripts/create_rc.sh

branko
tests: Remove metaprogramming constructs for vcs test classes (issue #309):

- Removed use of the globals() and type() constructs to
programatically instantiate Git/Mercurial-specific test
classes. This should make it a bit clearer what tests are being run
at the expense of possible future VCS additions.
- Removed the SCM_TESTS VCS test configuration variable, since it got
removed. Previously it was used for instantiating test classes.
- Updated small snippet of inline documentation that described the use
of SCM_TESTS variable. New text points to inheriting from generic
test classes instead.
- base.py had a dead snippet - kill it.
#!/bin/sh
psql -U postgres -h localhost -c 'drop database if exists kallithea;'
psql -U postgres -h localhost -c 'create database kallithea;'
gearbox setup-db -c server.ini --force-yes --user=username --password=qweqwe --email=username@example.com --repos=/home/username/repos --no-public-access
API_KEY=`psql -R " " -A -U postgres -h localhost -c "select api_key from users where admin=TRUE" -d kallithea | awk '{print $2}'`
echo "run those after running server"
gearbox serve -c server.ini --pid-file=server.pid --daemon
sleep 3
kallithea-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user username:demo1 password:qweqwe email:demo1@example.com
kallithea-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user username:demo2 password:qweqwe email:demo2@example.com
kallithea-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user username:demo3 password:qweqwe email:demo3@example.com
kallithea-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user_group group_name:demo12
kallithea-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 add_user_to_user_group usergroupid:demo12 userid:demo1
kallithea-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 add_user_to_user_group usergroupid:demo12 userid:demo2
echo "killing server"
kill `cat server.pid`
rm server.pid