All tests in this repo require a real PostgreSQL server and are organized at the top level:
test_proxy.py: proxy behavior tests (connection, SSL, hang regressions)test_plugins.py: plugin integration tests (HLL rewrite behavior)
- Python
3.13(same version as CI) - Docker (for local disposable PostgreSQL)
psql(postgresql-client)openssl(SSL tests generate a temporary self-signed cert/key at runtime)act(optional, for local GitHub Actions runs)
Install Python deps in the project virtualenv:
make install-test- Fastest full local run with disposable Postgres:
make test - Run only proxy tests (using your own Postgres):
python -m pytest tests/test_proxy.py -vv - Run only plugin tests:
python -m pytest tests/test_plugins.py -vv - Run exact CI workflow locally:
make test-act
make test starts a temporary PostgreSQL container, waits for readiness, sets DB env vars, then runs:
python -m pytest -vvUse it when you want one command that matches normal contributor workflow.
make testIf you already have PostgreSQL running, set connection env vars and run only proxy tests:
export E2E_PG_HOST=127.0.0.1
export E2E_PG_PORT=5432
export E2E_PG_USER=postgres
export E2E_PG_PASSWORD=postgres
export E2E_PG_DB=postgres
python -m pytest tests/test_proxy.py -vvIf PostgreSQL is not reachable, tests fail fast at startup.
python -m pytest tests/test_plugins.py -vvRequires PostgreSQL to be running with the E2E_PG_* env vars set (see section 2).
make test-actUseful overrides:
# Refresh workflow images
make test-act ACT_PULL=true
# Match GitHub x86_64 runner architecture (slower on Apple Silicon)
make test-act ACT_CONTAINER_ARCH=linux/amd64