diff --git a/test/SpecHelper.hs b/test/SpecHelper.hs index 081fff82f..a63340145 100644 --- a/test/SpecHelper.hs +++ b/test/SpecHelper.hs @@ -35,7 +35,7 @@ dbString :: String dbString = "postgres://postgrest_test_authenticator@localhost:5432/postgrest_test" cfg :: String -> Maybe Int -> AppConfig -cfg conStr = AppConfig conStr 3000 "postgrest_anonymous" "test" (secret "safe") 10 +cfg conStr = AppConfig conStr 3000 "postgrest_test_anonymous" "test" (secret "safe") 10 cfgDefault :: AppConfig cfgDefault = cfg dbString Nothing diff --git a/test/Unit/PgQuerySpec.hx b/test/Unit/PgQuerySpec.hx index 5842fe1ef..eb7b57fb3 100644 --- a/test/Unit/PgQuerySpec.hx +++ b/test/Unit/PgQuerySpec.hx @@ -60,7 +60,7 @@ spec = around dbWithSchema $ do quickALQuery c "select * from \"1\".items where id = ?" [snd row] `shouldReturn` [[row]] - let {user = "jdoe"; pass = "secret"; role = "test_default_role"} + let {user = "jdoe"; pass = "secret"; role = "postgrest_test_default_role"} describe "addUser" $ do it "adds a correct user to the right table" $ \conn -> do addUser user pass role conn diff --git a/test/fixtures/privileges.sql b/test/fixtures/privileges.sql index 86b8e541e..86b7c0c03 100644 --- a/test/fixtures/privileges.sql +++ b/test/fixtures/privileges.sql @@ -2,7 +2,7 @@ GRANT USAGE ON SCHEMA postgrest , test -TO postgrest_anonymous; +TO postgrest_test_anonymous; -- Schema test objects SET search_path = test, pg_catalog; @@ -32,12 +32,12 @@ GRANT ALL ON TABLE , users , users_projects , users_tasks -TO postgrest_anonymous; +TO postgrest_test_anonymous; GRANT USAGE ON SEQUENCE auto_incrementing_pk_id_seq , items_id_seq -TO postgrest_anonymous; +TO postgrest_test_anonymous; -- Privileges for non anonymous users GRANT USAGE ON SCHEMA test TO postgrest_test_author; diff --git a/test/fixtures/roles.sql b/test/fixtures/roles.sql index eaa4bf7ff..94d8a9084 100644 --- a/test/fixtures/roles.sql +++ b/test/fixtures/roles.sql @@ -1,7 +1,7 @@ -DROP ROLE IF EXISTS postgrest_test_authenticator, postgrest_anonymous, test_default_role, postgrest_test_author; +DROP ROLE IF EXISTS postgrest_test_authenticator, postgrest_test_anonymous, postgrest_test_default_role, postgrest_test_author; CREATE ROLE postgrest_test_authenticator WITH login; -CREATE ROLE postgrest_anonymous; -CREATE ROLE test_default_role; +CREATE ROLE postgrest_test_anonymous; +CREATE ROLE postgrest_test_default_role; CREATE ROLE postgrest_test_author; -GRANT postgrest_anonymous, test_default_role, postgrest_test_author TO postgrest_test_authenticator; +GRANT postgrest_test_anonymous, postgrest_test_default_role, postgrest_test_author TO postgrest_test_authenticator;