diff options
author | Andrew Manning <tamanning@zoho.com> | 2018-03-27 21:11:34 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2018-03-27 21:11:34 -0400 |
commit | 1dc795722a8e748ebb98e8fab778cd4686a0654f (patch) | |
tree | 4f4a4e8dea10090106c4d54a02c6860332cd9df4 /tests | |
parent | dcd658f12ea60945678717e3c310e94ece7b1f96 (diff) | |
parent | c98776923a3aed4a0a17ca1412787de3b718eba9 (diff) | |
download | volse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.tar.gz volse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.tar.bz2 volse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.zip |
Merge branch 'dev' into oauth2
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/travis/prepare_pgsql.sh | 17 | ||||
-rw-r--r-- | tests/unit/Access/PermissionRolesTest.php | 3 |
2 files changed, 13 insertions, 7 deletions
diff --git a/tests/travis/prepare_pgsql.sh b/tests/travis/prepare_pgsql.sh index 0175b9858..c6b12e4d6 100755 --- a/tests/travis/prepare_pgsql.sh +++ b/tests/travis/prepare_pgsql.sh @@ -27,14 +27,19 @@ set -e echo "Preparing for PostgreSQL ..." +if [[ "$POSTGRESQL_VERSION" == "10" ]]; then + echo "Using PostgreSQL in Docker container, need to use TCP" + export PROTO="-h localhost" +fi + # Print out some PostgreSQL information psql --version # Why does this hang further execution of the job? -psql -U postgres -c "SELECT VERSION();" +psql $PROTO -U postgres -c "SELECT VERSION();" # Create Hubzilla database -psql -U postgres -c "DROP DATABASE IF EXISTS travis_hubzilla;" -psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL +psql $PROTO -U postgres -c "DROP DATABASE IF EXISTS travis_hubzilla;" +psql $PROTO -U postgres -v ON_ERROR_STOP=1 <<-EOSQL CREATE USER travis_hz WITH PASSWORD 'hubzilla'; CREATE DATABASE travis_hubzilla; ALTER DATABASE travis_hubzilla OWNER TO travis_hz; @@ -42,8 +47,8 @@ psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL EOSQL # Import table structure -psql -U travis_hz -v ON_ERROR_STOP=1 travis_hubzilla < ./install/schema_postgres.sql +psql $PROTO -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 travis_hubzilla -c "\dt;" +psql $PROTO -U postgres -l +psql $PROTO -U postgres -d travis_hubzilla -c "\dt;" diff --git a/tests/unit/Access/PermissionRolesTest.php b/tests/unit/Access/PermissionRolesTest.php index 5e64e773a..f2636da62 100644 --- a/tests/unit/Access/PermissionRolesTest.php +++ b/tests/unit/Access/PermissionRolesTest.php @@ -62,6 +62,7 @@ class PermissionRolesTest extends UnitTestCase { $this->assertEquals($roles, $r->roles()); $socialNetworking = [ + 'social_party' => 'Social - Party', 'social' => 'Social - Mostly Public', 'social_restricted' => 'Social - Restricted', 'social_private' => 'Social - Private' @@ -97,4 +98,4 @@ class PermissionRolesTest extends UnitTestCase { $this->assertEquals(['role' => 'nonexistent'], $rp_nonexistent); } -}
\ No newline at end of file +} |