Update testing docs

Add the -h localhost to psql command since ubuntu seems to prefer that.
This commit is contained in:
Lucas Bickel 2017-02-28 12:26:57 +01:00
parent 4936b16bc1
commit 0d2e8b3b3e
1 changed files with 7 additions and 4 deletions

View File

@ -4,6 +4,9 @@
The MVC tests are based on PHPUnit and may be found in `airtime_mvc/tests`.
You can run the tests in you working copy as described below or let travis
run them for you on pushes.
### Prepare environment
PHPUnit will need to be able to access the database and be allowed to
@ -11,10 +14,10 @@ create the libretime_test database. On a clean install this may be
set up as follows.
```bash
psql -c 'CREATE DATABASE libretime;' -U postgres
psql -c "CREATE USER libretime WITH PASSWORD 'libretime';" -U postgres
psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;' -U postgres
psql -c 'ALTER USER libretime CREATEDB;' -U postgres
psql -c 'CREATE DATABASE libretime;' -U postgres -h localhost
psql -c "CREATE USER libretime WITH PASSWORD 'libretime';" -U postgres -h localhost
psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;' -U postgres -h localhost
psql -c 'ALTER USER libretime CREATEDB;' -U postgres -h localhost
```
In this case the libretime database is only used for the initial connection