Skip to content

Commit

Permalink
travis.py: Use sudo to set postgres user
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Apr 16, 2013
1 parent 6572f8b commit 964814a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/travis.py
Expand Up @@ -23,15 +23,15 @@ def shell(arg, split_on='~'):
shell('sudo~apt-get~install~solr-jetty~postgresql-%s' % PG_VERSION)

sql = "CREATE USER ckanuser WITH PASSWORD 'pass';"
shell('psql~-U~postgres~-c~%s' % sql)
shell('sudo~-u~postgres~psql~-c~%s' % sql)

sql = "CREATE USER readonlyuser WITH PASSWORD 'pass';"
shell('psql~-U~postgres~-c~%s' % sql)
shell('sudo~-u~postgres~psql~-c~%s' % sql)

sql = "CREATE DATABASE ckan_test WITH OWNER ckanuser;"
shell('psql~-U~postgres~-c~%s' % sql)
shell('sudo~-u~postgres~psql~-c~%s' % sql)

sql = "CREATE DATABASE ckan_test_datastore WITH OWNER ckanuser;"
shell('psql~-U~postgres~-c~%s' % sql)
shell('sudo~-u~postgres~psql~-c~%s' % sql)

shell('psql~-U~ckanuser~ckan_test~-c~SELECT version();')

0 comments on commit 964814a

Please sign in to comment.