Documentation
¶
Overview ¶
Package pgtest starts PostgreSQL test containers with the production role scripts and migrations applied.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecUntriggered ¶
ExecUntriggered runs sql on the superuser connection super with the tables' triggers off (session_replication_role = replica, superuser only); constraints still apply. Fixtures use it for rows a service could not write as they are, such as an action started or finished long ago (migration 00084 bounds an action's times to the database clock).
Types ¶
type Audit ¶
type Audit struct {
Super, Owner, Writer, Reader string
}
Audit holds the DSNs of every role of database paddock_audit.
func SharedAudit ¶
SharedAudit starts one migrated paddock_audit database per test binary.
func StartAudit ¶
StartAudit starts PostgreSQL with deploy/compose/postgres/provision-roles.sh and migrates paddock_audit.
type Paddock ¶
type Paddock struct {
Super, Owner, API, Platform, Relay, Worker, Compiler, EscrowReader, Revocation, Notifier, Backup string
}
Paddock holds the DSNs of every role of database paddock.
func SharedPaddock ¶
SharedPaddock starts one migrated paddock database per test binary; Ryuk removes the container at exit.
func StartPaddock ¶
StartPaddock starts PostgreSQL with deploy/compose/postgres/provision-roles.sh and migrates database paddock.