Documentation
¶
Overview ¶
Package testinfra brings up the real external dependencies chatz uses (a real Postgres via testcontainers-go) for integration tests. It runs the SAME connection + migration path as production (internal/pkg/db.Connect) so tests catch divergence between test setup and prod setup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Infra ¶
type Infra struct {
PostgresContainer *tcpostgres.PostgresContainer
Database *db.Handle
PG *postgresql.Postgresql
}
Infra holds the running containers + connections for a test package. Call Teardown when done (typically from TestMain wrapping m.Run).
Click to show internal directories.
Click to hide internal directories.