testutil

package
v0.0.0-...-f2259ff Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testutil provides shared test helpers for integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyMigrations

func ApplyMigrations(t *testing.T, pool *pgxpool.Pool)

ApplyMigrations is a test helper that runs all pending migrations.

func ConnectAndMigrate

func ConnectAndMigrate(t *testing.T) *pgxpool.Pool

ConnectAndMigrate connects to the test database and applies all pending migrations. It returns a ready-to-use pool.

func ConnectPool

func ConnectPool(t *testing.T) *pgxpool.Pool

ConnectPool is a test helper that connects to the database using MOTE_DATABASE_URL, skipping the test if the variable is unset.

Types

This section is empty.

Jump to

Keyboard shortcuts

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