Help us shape the future of Go! Take the 2026 Go Developer Survey

pgtest

package
v0.136.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 7 Imported by: 0

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

func EnsureExtensions(t testing.TB, ctx context.Context, pool *pgxpool.Pool)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL