You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Run the faucet ledger and handler tests against Postgres in CI #835
Priority: medium. Follow-up to #818 / #819 and #828.
Problem
The most valuable faucet tests (handler behaviour, concurrency, migrations and schema drift) need a real Postgres, so they are skipped unless FAUCET_TEST_DATABASE_URL is set and are not wired into CI. Tests that nobody runs tend to rot, and the concurrency guarantees (advisory lock, address cap, minimum interval) are exactly what they protect.
Proposal
Add a Postgres service container to the Studio build workflow, set FAUCET_TEST_DATABASE_URL, and run both suites on Node 20: the ledger tests (jest) and the handler tests (node --test, see the README).
Alternatively, once the faucet logic is extracted behind injected dependencies (see the FaucetService issue), run most of it as plain unit tests and keep only the ledger tests on Postgres.
Notes
CI configuration was deliberately left unchanged in #830; this issue is the explicit go-ahead to revisit it.
Activity