test(io): move connection related tests to test_connection.py

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
Taimoor Zaeem
2026-08-13 03:42:29 +05:00
parent d84d00be8e
commit 2122dcef97
3 changed files with 318 additions and 303 deletions
+1 -13
View File
@@ -5,10 +5,7 @@ import pytest
from config import BASEDIR, FIXTURES, SECRET
from util import authheader, jwtauthheader
from postgrest import (
run,
wait_until_exit,
)
from postgrest import run
@pytest.mark.parametrize(
@@ -62,15 +59,6 @@ def test_read_secret_from_stdin_dbconfig(defaultenv):
assert response.status_code == 200
def test_fail_with_invalid_password(defaultenv):
"Connecting with an invalid password should fail without retries."
uri = f'postgresql://?dbname={defaultenv["PGDATABASE"]}&host={defaultenv["PGHOST"]}&user=some_protected_user&password=invalid_pass'
env = {**defaultenv, "PGRST_DB_URI": uri}
with run(env=env, wait_for=None) as postgrest:
exitCode = wait_until_exit(postgrest)
assert exitCode == 1
@pytest.mark.parametrize(
"roleclaim", FIXTURES["roleclaims"], ids=lambda claim: claim["key"]
)