"authentication‑required error" in racket/db's connect
20K reputation · 30 Jul 2026, 15:08 UTC
Goal
Determine whether Racket's testing ecosystem should supply a built‑in mock connection for racket/db's connect procedure so that integration tests can run without real database credentials.
Constraints and uncertainty
The connect function raises an authentication‑required error when username or password are omitted, as documented in racket/db. Teams currently rely on ad‑hoc stubs, dependency injection, or external mocking libraries, leading to inconsistent test fidelity and setup effort. It is unclear whether a standardized mock utility would reduce duplication without limiting flexibility for different JDBC drivers or URL formats.
Should the Racket testing library provide a mock connection utility for racket/db? What trade‑offs exist between a built‑in mock and third‑party options? How can projects adopt a consistent mocking strategy while supporting various databases?