Skip to content

Commit

Permalink
Switch to travis file from master
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelbabu committed May 10, 2013
1 parent 4515083 commit 1cbb0e4
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions bin/travis-build
Expand Up @@ -28,29 +28,25 @@ pip install -r pip-requirements-test.txt --use-mirrors

python setup.py develop

# Configure CKAN's configuration file
paster make-config ckan development.ini --no-interactive
sed -i -e 's/.*solr_url.*/solr_url = http:\/\/127.0.0.1:8983\/solr/' development.ini
sed -i -e 's/.*ckan\.site_id.*/ckan.site_id = travis_ci/' development.ini
sed -i -e 's/^sqlalchemy.url.*/sqlalchemy.url = postgresql:\/\/ckan_default:pass@localhost\/ckan_test/' development.ini
sed -i -e 's/.*datastore.write_url.*/ckan.datastore.write_url = postgresql:\/\/ckan_default:pass@localhost\/datastore_test/' development.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
# FIXME the solr schema cannot be hardcoded as it is dependent on the ckan version
sudo cp ckan/config/solr/schema-2.0.xml /etc/solr/conf/schema.xml
sudo service jetty restart

paster --plugin=ckan db init
paster db init -c test-core.ini

# If Postgres >= 9.0, we don't need to use datastore's legacy mode.
if [ $PGVERSION != '8.4' ]
then
sed -i -e 's/.*datastore.read_url.*/ckan.datastore.read_url = postgresql:\/\/datastore_default:pass@localhost\/datastore_test/' development.ini
psql -c 'CREATE USER datastore_default;' -U postgres
sed -i -e 's/.*datastore.read_url.*/ckan.datastore.read_url = postgresql:\/\/datastore_default@\/datastore_test/' test-core.ini
paster datastore set-permissions postgres -c test-core.ini
else
sed -i -e 's/.*datastore.read_url.*//' test-core.ini
fi

cat test-core.ini

# And finally, run the tests
nosetests --ckan --with-pylons=test-core.ini --nologcapture ckan ckanext

0 comments on commit 1cbb0e4

Please sign in to comment.