Documentation
¶
Overview ¶
Package pgtest provisions disposable keyword-profile schemas on the CONTENTKIT_TEST_URL Postgres for integration tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureExtensions ¶
EnsureExtensions installs pg_trgm and PGroonga once in public under an advisory lock (CREATE EXTENSION IF NOT EXISTS is not concurrency-safe).
func MediaWorkerRole ¶ added in v0.58.0
func MediaWorkerRole(t testing.TB, ctx context.Context, admin *pgxpool.Pool, schema string, hostSchemas ...string) string
MediaWorkerRole creates a login with exactly the grants production gives a host's media worker (doujins-gitops bind-roles: database CONNECT and CREATE, USAGE and CREATE on its schema, DML on its tables and sequences, USAGE on public and the host schemas) and returns its DSN. The role is dropped on cleanup.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.