Skip to content

Commit

Permalink
[#517] Rename datastore -> ckan_test_datastore
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Apr 4, 2013
1 parent e6eec22 commit 39c72f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/travis-build
Expand Up @@ -16,23 +16,23 @@ sudo apt-get update -qq
sudo apt-get install solr-jetty postgresql-$PGVERSION

# Don't require a password to access DB
sudo sed -i -e 's/ident/trust/g' /etc/postgresql/$PGVERSION/main/pg_hba.conf
sudo sed -i -e 's/ident/trust/g' /etc/postgresql/$PGVERSION/main/pg_hba.conf

sudo service postgresql reload

pip install -r pip-requirements.txt --use-mirrors
pip install -r pip-requirements-test.txt --use-mirrors

psql -c 'CREATE DATABASE ckan_test;' -U postgres
psql -c 'CREATE DATABASE datastore;' -U postgres
psql -c 'CREATE DATABASE ckan_test_datastore;' -U postgres

python setup.py develop

# Configure CKAN's configuration file
sed -i -e 's/.*solr_url.*/solr_url = http:\/\/127.0.0.1:8983\/solr/' test-core.ini
sed -i -e 's/.*ckan\.site_id.*/ckan.site_id = travis_ci/' test-core.ini
sed -i -e 's/^sqlalchemy.url.*/sqlalchemy.url = postgresql:\/\/postgres@\/ckan_test/' test-core.ini
sed -i -e 's/.*datastore.write_url.*/ckan.datastore.write_url = postgresql:\/\/postgres@\/datastore/' test-core.ini
sed -i -e 's/.*datastore.write_url.*/ckan.datastore.write_url = postgresql:\/\/postgres@\/ckan_test_datastore/' test-core.ini

# Configure Solr
echo "NO_START=0\nJETTY_HOST=127.0.0.1\nJETTY_PORT=8983\nJAVA_HOME=$JAVA_HOME" | sudo tee /etc/default/jetty
Expand All @@ -46,7 +46,7 @@ paster db init -c test-core.ini
if [ $PGVERSION != '8.4' ]
then
psql -c 'CREATE USER readonlyuser;' -U postgres
sed -i -e 's/.*datastore.read_url.*/ckan.datastore.read_url = postgresql:\/\/readonlyuser@\/datastore/' test-core.ini
sed -i -e 's/.*datastore.read_url.*/ckan.datastore.read_url = postgresql:\/\/readonlyuser@\/ckan_test_datastore/' test-core.ini
paster datastore set-permissions postgres -c test-core.ini
fi

Expand Down

0 comments on commit 39c72f2

Please sign in to comment.