test: move db-pre-config with pg reserved word func to spec tests

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
Taimoor Zaeem
2026-07-07 23:32:40 +05:00
parent 6670b1a4b6
commit 44edf962d8
5 changed files with 15 additions and 37 deletions
@@ -478,23 +478,6 @@
pdSchema: public
pdVolatility: Volatile
- - qiName: 'true'
qiSchema: public
- - pdDescription: null
pdFuncSettings: []
pdHasVariadic: false
pdName: 'true'
pdParams: []
pdReturnType:
contents:
contents:
qiName: bool
qiSchema: pg_catalog
tag: Scalar
tag: Single
pdSchema: public
pdVolatility: Volatile
- - qiName: create_function
qiSchema: public
- - pdDescription: null
-4
View File
@@ -251,10 +251,6 @@ select * from projects;
create or replace view infinite_recursion as
select * from infinite_recursion;
create or replace function "true"() returns boolean as $_$
select true;
$_$ language sql;
create or replace function notify_pgrst() returns void as $$
notify pgrst;
$$ language sql;
-13
View File
@@ -2037,19 +2037,6 @@ def test_connection_error_message_does_not_claim_retry(defaultenv):
assert any('"message":"Database connection error."' in line for line in output)
def test_db_pre_config_with_pg_reserved_words(defaultenv):
"The db-pre-config should not fail unexpectedly when function name is a postgres reserved word"
env = {
**defaultenv,
"PGRST_DB_PRE_CONFIG": "true", # call true function
}
with run(env=env) as postgrest:
response = postgrest.session.post("/rpc/true")
assert response.status_code == 200
def test_db_pre_config_with_non_existent_function(defaultenv):
"Log error when db-pre-config is set to non-existent function"