testutil

package
v0.1.0-alpha12 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package testutil provides test helper functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(t *testing.T) context.Context

Context returns a context.Context that is cancelled when the test finishes.

func Postgres

func Postgres(t *testing.T, ctx context.Context) *sql.DB

Postgres returns an sql.DB instance assumed to be available on localhost:5432. Migrations are performed and all data is deleted once the test is complete.

Types

This section is empty.

Jump to

Keyboard shortcuts

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