testutil

package
v0.0.0-...-341372b Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureStdout

func CaptureStdout(t *testing.T, fn func()) string

CaptureStdout captures standard output during fn() and return it.

func MustGetConfig

func MustGetConfig() *config.Config

MustGetConfig gets the config only once and returns it or panic if error occured.

func MustGetDB

func MustGetDB() *sql.DB

MustGetDB returns *sql.DB or panic if error occured.

func TruncateTable

func TruncateTable(ctx context.Context, t *testing.T, db *sql.DB, tableName string)

TruncateTable deletes all records in given table.

Types

This section is empty.

Jump to

Keyboard shortcuts

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