Skip to content

Commit

Permalink
[#517] Rename databases to ckan_dev and ckan_test
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Mar 5, 2013
1 parent 69c5f3c commit f978f85
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -9,13 +9,13 @@ install:
- "pip install -r pip-requirements.txt --use-mirrors"
- "pip install -r pip-requirements-test.txt --use-mirrors"
before_script:
- psql -c 'CREATE DATABASE ckantesting;' -U postgres
- psql -c 'CREATE DATABASE ckan_test;' -U postgres
- psql -c 'CREATE DATABASE datastore;' -U postgres
- psql -c 'CREATE USER readonlyuser;' -U postgres
- python setup.py develop
- 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@localhost\/ckantesting/' test-core.ini
- sed -i -e 's/^sqlalchemy.url.*/sqlalchemy.url = postgresql:\/\/postgres@localhost\/ckan_test/' test-core.ini
- sed -i -e 's/.*datastore.write_url.*/ckan.datastore.write_url = postgresql:\/\/postgres@localhost\/datastore/' test-core.ini
- sed -i -e 's/.*datastore.read_url.*/ckan.datastore.read_url = postgresql:\/\/readonlyuser@localhost\/datastore/' test-core.ini
- cat test-core.ini
Expand Down
4 changes: 2 additions & 2 deletions bin/osx-postgres-mem.sh
Expand Up @@ -13,8 +13,8 @@ case $1 in
${PGCTL} -D ${PGDATA} init
${PGCTL} -D ${PGDATA} start
sleep 2;
psql -c "CREATE DATABASE ckantest;" postgres
psql -c "CREATE DATABASE ckantesting;" postgres
psql -c "CREATE DATABASE ckan_dev;" postgres
psql -c "CREATE DATABASE ckan_test;" postgres
;;
stop)
## stop postgres
Expand Down
2 changes: 1 addition & 1 deletion ckan/config/deployment.ini_tmpl
Expand Up @@ -65,7 +65,7 @@ ckan.plugins = stats json_preview recline_preview
# Specify the database for SQLAlchemy to use:
# * Postgres is currently required for a production CKAN deployment
# * Sqlite (memory or file) can be used as a quick alternative for testing
sqlalchemy.url = postgresql://ckanuser:pass@localhost/ckantest
sqlalchemy.url = postgresql://ckanuser:pass@localhost/ckan_dev
#sqlalchemy.url = sqlite:///
#sqlalchemy.url = sqlite:///%(here)s/somedb.db

Expand Down
6 changes: 3 additions & 3 deletions doc/install-from-source.rst
Expand Up @@ -100,13 +100,13 @@ prompted::

sudo -u postgres createuser -S -D -R -P ckanuser

Create the database (owned by ``ckanuser``), which we'll call ``ckantest``::
Create the database (owned by ``ckanuser``), which we'll call ``ckan_dev``::

sudo -u postgres createdb -O ckanuser ckantest -E utf-8
sudo -u postgres createdb -O ckanuser ckan_dev -E utf-8

If you are planning to run the test then create a database for them too::

sudo -u postgres createdb -O ckanuser ckantesting -E utf-8
sudo -u postgres createdb -O ckanuser ckan_test -E utf-8

4. Create a CKAN config file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 3 additions & 3 deletions test-core.ini
Expand Up @@ -19,13 +19,13 @@ debug = false
# Specify the database for SQLAlchemy to use:
# * Postgres is currently required for a production CKAN deployment
# * Sqlite (memory or file) can be used as a quick alternative for testing
sqlalchemy.url = postgresql://ckanuser:pass@localhost/ckantesting
sqlalchemy.url = postgresql://ckanuser:pass@localhost/ckan_test
#sqlalchemy.url = sqlite:///

## Datastore
## Uncommment to set the datastore urls
ckan.datastore.write_url = postgresql://ckanuser:pass@localhost/ckantesting
ckan.datastore.read_url = postgresql://readonlyuser:pass@localhost/ckantesting
ckan.datastore.write_url = postgresql://ckanuser:pass@localhost/ckan_test
ckan.datastore.read_url = postgresql://readonlyuser:pass@localhost/ckan_test

ckan.auth.user_create_organizations = true
ckan.auth.user_create_groups = true
Expand Down

0 comments on commit f978f85

Please sign in to comment.