test: move http header related tests from io tests to spec tests

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
Taimoor Zaeem
2026-06-16 13:13:51 -05:00
committed by Steve Chavez
parent 8fa26ee865
commit b6c12abf0e
7 changed files with 44 additions and 44 deletions
@@ -196,23 +196,6 @@
pdSchema: public
pdVolatility: Volatile
- - qiName: custom_vary_hdr
qiSchema: public
- - pdDescription: null
pdFuncSettings: []
pdHasVariadic: false
pdName: custom_vary_hdr
pdParams: []
pdReturnType:
contents:
contents:
qiName: void
qiSchema: pg_catalog
tag: Scalar
tag: Single
pdSchema: public
pdVolatility: Volatile
- - qiName: get_postgres_version
qiSchema: public
- - pdDescription: null
-7
View File
@@ -259,13 +259,6 @@ create or replace function notify_pgrst() returns void as $$
notify pgrst;
$$ language sql;
create or replace function custom_vary_hdr() returns void as $$
begin
perform set_config('response.headers', '[{"Vary": "X-Test-Accept"}]', false);
end
$$ language plpgsql;
create or replace function get_work_mem() returns text as $$
select current_setting('work_mem', true);
$$ language sql;
-20
View File
@@ -2087,26 +2087,6 @@ def test_client_error_verbosity_config(defaultenv):
}
def test_vary_custom_header_set(defaultenv):
"Test default Vary header value is overridden in pre-request database function"
env = {**defaultenv, "PGRST_DB_PRE_REQUEST": "custom_vary_hdr"}
with run(env=env) as postgrest:
response = postgrest.session.get("/projects")
assert response.headers["Vary"] == "X-Test-Accept"
def test_vary_default_header_set(defaultenv):
"Test default Vary header value matches default one"
with run(env=defaultenv) as postgrest:
response = postgrest.session.get("/projects")
assert response.headers["Vary"] == "Accept, Prefer, Range"
def test_positive_pool_metric(defaultenv):
"When a network failure is caused on the pg connection, pgrst_db_pool_available stays positive"