Documentation
¶
Overview ¶
Package testpg creates isolated PostgreSQL schemas for integration tests. It never substitutes an in-memory database for PostgreSQL behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
func OpenWithMaxConns ¶
OpenWithMaxConns creates an isolated real-PostgreSQL test database whose application pool has the requested capacity. Small pools are useful for proving that Flow releases its connection before invoking application code.
func OpenWithQueryTracer ¶ added in v0.3.0
func OpenWithQueryTracer(t testing.TB, tracer pgx.QueryTracer) Database
OpenWithQueryTracer creates an isolated database whose application connections report SQL through tracer. It is intended for query-shape and query-count regression tests.
Click to show internal directories.
Click to hide internal directories.