From 0d2e8b3b3e59f0a2e7f055712bf42199ad5b3463 Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Tue, 28 Feb 2017 12:26:57 +0100 Subject: [PATCH] Update testing docs Add the -h localhost to psql command since ubuntu seems to prefer that. --- docs/TESTING.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/TESTING.md b/docs/TESTING.md index 5b60960eb..11e6f1b0c 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -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