annotate rhodecode/tests/scripts/create_rc.sh @ 3937:2f5e6f1c5bdc beta

Bumped mercurial version
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 03 Jun 2013 14:18:07 +0200
parents 29630805893d
children c3245a0452a3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2756
d753f2da69f2 added bootstrap script for my tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 psql -U postgres -h localhost -c 'drop database if exists rhodecode;'
d753f2da69f2 added bootstrap script for my tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 psql -U postgres -h localhost -c 'create database rhodecode;'
2919
29630805893d Implemented proposed changes from pull request #77
Marcin Kuzminski <marcin@python-works.com>
parents: 2824
diff changeset
3 paster setup-rhodecode rc.ini --force-yes --user=marcink --password=qweqwe --email=marcin@python-blog.com --repos=/home/marcink/repos
2756
d753f2da69f2 added bootstrap script for my tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 API_KEY=`psql -R " " -A -U postgres -h localhost -c "select api_key from users where admin=TRUE" -d rhodecode | awk '{print $2}'`
d753f2da69f2 added bootstrap script for my tests
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 echo "run those after running server"
2824
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
6 paster serve rc.ini --pid-file=rc.pid --daemon
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
7 sleep 3
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
8 rhodecode-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user username:demo1 password:qweqwe email:demo1@rhodecode.org
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
9 rhodecode-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user username:demo2 password:qweqwe email:demo2@rhodecode.org
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
10 rhodecode-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_user username:demo3 password:qweqwe email:demo3@rhodecode.org
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
11 rhodecode-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 create_users_group group_name:demo12
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
12 rhodecode-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 add_user_to_users_group usersgroupid:demo12 userid:demo1
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
13 rhodecode-api --apikey=$API_KEY --apihost=http://127.0.0.1:5001 add_user_to_users_group usersgroupid:demo12 userid:demo2
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
14 echo "killing server"
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
15 kill `cat rc.pid`
92822bd2e88a fully automated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 2756
diff changeset
16 rm rc.pid