test(io): set client_min_messages to warning in SQL fixtures
To suppress unwanted "NOTICE: ..." messages which pollute the log. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
|
SET client_min_messages = WARNING; -- suppress "NOTICE: ..." messages which pollute the log
|
||||||
SET check_function_bodies = false; -- to allow conditionals based on the pg version
|
SET check_function_bodies = false; -- to allow conditionals based on the pg version
|
||||||
SET search_path = public;
|
SET search_path = public;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ VALUES (1, 'pulp fiction', 1),
|
|||||||
DO $do$BEGIN
|
DO $do$BEGIN
|
||||||
IF (SELECT current_setting('server_version_num')::INT >= 150000) THEN
|
IF (SELECT current_setting('server_version_num')::INT >= 150000) THEN
|
||||||
ALTER ROLE postgrest_test_w_superuser_settings SET log_min_duration_sample = 12345;
|
ALTER ROLE postgrest_test_w_superuser_settings SET log_min_duration_sample = 12345;
|
||||||
GRANT SET ON PARAMETER log_min_duration_sample to postgrest_test_authenticator;
|
GRANT SET ON PARAMETER log_min_duration_sample to "Postgrest_Test_Authenticator";
|
||||||
END IF;
|
END IF;
|
||||||
END$do$;
|
END$do$;
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ $$ language sql;
|
|||||||
create function change_max_rows_config(val int, notify bool default false) returns void as $_$
|
create function change_max_rows_config(val int, notify bool default false) returns void as $_$
|
||||||
begin
|
begin
|
||||||
execute format($$
|
execute format($$
|
||||||
alter role postgrest_test_authenticator set pgrst.db_max_rows = %L;
|
alter role "Postgrest_Test_Authenticator" set pgrst.db_max_rows = %L;
|
||||||
$$, val);
|
$$, val);
|
||||||
if notify then
|
if notify then
|
||||||
perform pg_notify('pgrst', 'reload config');
|
perform pg_notify('pgrst', 'reload config');
|
||||||
@@ -70,13 +70,13 @@ end $_$ volatile security definer language plpgsql ;
|
|||||||
|
|
||||||
create function reset_max_rows_config() returns void as $_$
|
create function reset_max_rows_config() returns void as $_$
|
||||||
begin
|
begin
|
||||||
alter role postgrest_test_authenticator reset pgrst.db_max_rows;
|
alter role "Postgrest_Test_Authenticator" reset pgrst.db_max_rows;
|
||||||
end $_$ volatile security definer language plpgsql ;
|
end $_$ volatile security definer language plpgsql ;
|
||||||
|
|
||||||
create function change_db_schema_and_full_reload(schemas text) returns void as $_$
|
create function change_db_schema_and_full_reload(schemas text) returns void as $_$
|
||||||
begin
|
begin
|
||||||
execute format($$
|
execute format($$
|
||||||
alter role postgrest_test_authenticator set pgrst.db_schemas = %L;
|
alter role "Postgrest_Test_Authenticator" set pgrst.db_schemas = %L;
|
||||||
$$, schemas);
|
$$, schemas);
|
||||||
perform pg_notify('pgrst', 'reload config');
|
perform pg_notify('pgrst', 'reload config');
|
||||||
perform pg_notify('pgrst', 'reload schema');
|
perform pg_notify('pgrst', 'reload schema');
|
||||||
@@ -84,14 +84,14 @@ end $_$ volatile security definer language plpgsql ;
|
|||||||
|
|
||||||
create function v1.reset_db_schema_config() returns void as $_$
|
create function v1.reset_db_schema_config() returns void as $_$
|
||||||
begin
|
begin
|
||||||
alter role postgrest_test_authenticator reset pgrst.db_schemas;
|
alter role "Postgrest_Test_Authenticator" reset pgrst.db_schemas;
|
||||||
perform pg_notify('pgrst', 'reload config');
|
perform pg_notify('pgrst', 'reload config');
|
||||||
perform pg_notify('pgrst', 'reload schema');
|
perform pg_notify('pgrst', 'reload schema');
|
||||||
end $_$ volatile security definer language plpgsql ;
|
end $_$ volatile security definer language plpgsql ;
|
||||||
|
|
||||||
create function invalid_role_claim_key_reload() returns void as $_$
|
create function invalid_role_claim_key_reload() returns void as $_$
|
||||||
begin
|
begin
|
||||||
alter role postgrest_test_authenticator set pgrst.jwt_role_claim_key = 'test';
|
alter role "Postgrest_Test_Authenticator" set pgrst.jwt_role_claim_key = 'test';
|
||||||
perform pg_notify('pgrst', 'reload config');
|
perform pg_notify('pgrst', 'reload config');
|
||||||
end $_$ volatile security definer language plpgsql ;
|
end $_$ volatile security definer language plpgsql ;
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ $_$ language sql;
|
|||||||
|
|
||||||
create function reset_invalid_role_claim_key() returns void as $_$
|
create function reset_invalid_role_claim_key() returns void as $_$
|
||||||
begin
|
begin
|
||||||
alter role postgrest_test_authenticator reset pgrst.jwt_role_claim_key;
|
alter role "Postgrest_Test_Authenticator" reset pgrst.jwt_role_claim_key;
|
||||||
perform pg_notify('pgrst', 'reload config');
|
perform pg_notify('pgrst', 'reload config');
|
||||||
end $_$ volatile security definer language plpgsql ;
|
end $_$ volatile security definer language plpgsql ;
|
||||||
|
|
||||||
@@ -229,12 +229,12 @@ $$ language sql;
|
|||||||
|
|
||||||
create function change_db_schemas_config() returns void as $_$
|
create function change_db_schemas_config() returns void as $_$
|
||||||
begin
|
begin
|
||||||
alter role postgrest_test_authenticator set pgrst.db_schemas = 'test';
|
alter role "Postgrest_Test_Authenticator" set pgrst.db_schemas = 'test';
|
||||||
end $_$ volatile security definer language plpgsql;
|
end $_$ volatile security definer language plpgsql;
|
||||||
|
|
||||||
create function reset_db_schemas_config() returns void as $_$
|
create function reset_db_schemas_config() returns void as $_$
|
||||||
begin
|
begin
|
||||||
alter role postgrest_test_authenticator reset pgrst.db_schemas;
|
alter role "Postgrest_Test_Authenticator" reset pgrst.db_schemas;
|
||||||
end $_$ volatile security definer language plpgsql ;
|
end $_$ volatile security definer language plpgsql ;
|
||||||
|
|
||||||
create function test.get_current_schema() returns text as $$
|
create function test.get_current_schema() returns text as $$
|
||||||
|
|||||||
Reference in New Issue
Block a user