From fb111e6d958fdf56352db66e144134241abbacf8 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Sun, 10 Dec 2017 01:29:49 +0100 Subject: :white_check_mark: Unit Test for dba_pdo driver class. --- tests/travis/prepare_pgsql.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/travis/prepare_pgsql.sh') diff --git a/tests/travis/prepare_pgsql.sh b/tests/travis/prepare_pgsql.sh index 63c7388cb..3c38ef60c 100755 --- a/tests/travis/prepare_pgsql.sh +++ b/tests/travis/prepare_pgsql.sh @@ -34,10 +34,15 @@ psql -U postgres -c "SELECT VERSION();" # Create Hubzilla database psql -U postgres -c "DROP DATABASE IF EXISTS hubzilla;" -psql -U postgres -c "CREATE DATABASE hubzilla;" +psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL + CREATE USER hubzilla WITH PASSWORD 'hubzilla'; + CREATE DATABASE hubzilla; + ALTER DATABASE hubzilla OWNER TO hubzilla; + GRANT ALL PRIVILEGES ON DATABASE hubzilla TO hubzilla; +EOSQL # Import table structure -psql -U postgres -v ON_ERROR_STOP=1 hubzilla < ./install/schema_postgres.sql +psql -U hubzilla -v ON_ERROR_STOP=1 hubzilla < ./install/schema_postgres.sql # Show databases and tables psql -U postgres -l -- cgit v1.2.3 From 210c91398da573d3c44bd1ff5bee4c65128c8686 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Mon, 29 Jan 2018 21:14:03 +0100 Subject: Make it little bit less likely to erase a real database. Changed the default PHPUnit database environment variables to make it little bit less likely to truncate accidently a real database. --- tests/travis/prepare_pgsql.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/travis/prepare_pgsql.sh') diff --git a/tests/travis/prepare_pgsql.sh b/tests/travis/prepare_pgsql.sh index 3c38ef60c..0175b9858 100755 --- a/tests/travis/prepare_pgsql.sh +++ b/tests/travis/prepare_pgsql.sh @@ -33,17 +33,17 @@ psql --version psql -U postgres -c "SELECT VERSION();" # Create Hubzilla database -psql -U postgres -c "DROP DATABASE IF EXISTS hubzilla;" +psql -U postgres -c "DROP DATABASE IF EXISTS travis_hubzilla;" psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL - CREATE USER hubzilla WITH PASSWORD 'hubzilla'; - CREATE DATABASE hubzilla; - ALTER DATABASE hubzilla OWNER TO hubzilla; - GRANT ALL PRIVILEGES ON DATABASE hubzilla TO hubzilla; + CREATE USER travis_hz WITH PASSWORD 'hubzilla'; + CREATE DATABASE travis_hubzilla; + ALTER DATABASE travis_hubzilla OWNER TO travis_hz; + GRANT ALL PRIVILEGES ON DATABASE travis_hubzilla TO travis_hz; EOSQL # Import table structure -psql -U hubzilla -v ON_ERROR_STOP=1 hubzilla < ./install/schema_postgres.sql +psql -U travis_hz -v ON_ERROR_STOP=1 travis_hubzilla < ./install/schema_postgres.sql # Show databases and tables psql -U postgres -l -psql -U postgres -d hubzilla -c "\dt;" +psql -U postgres -d travis_hubzilla -c "\dt;" -- cgit v1.2.3