testutils

package
v0.0.7-alpha Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnableSnapshot = map[string]struct{}{}

EnableSnapshot is a map to enable snapshot for a specific test. The key can be either: - the name of the test (t.Name()) - "all" to enable all snapshots

Functions

func AssertSnapshotDiff

func AssertSnapshotDiff(t TestingT, content string, save ...bool)

func AssertSnapshotPgDumpDiff

func AssertSnapshotPgDumpDiff(t TestingT, schemaName string, db schema.DatabaseCredentials, id string, enable ...bool)

func EnableSnapshotFor

func EnableSnapshotFor(t TestingT)

func EnableSnapshotForAll

func EnableSnapshotForAll()

func EnvOrDefault

func EnvOrDefault(key, defaultValue string) string

func MaySnapshotSavePgDump

func MaySnapshotSavePgDump(t TestingT, schemaName string, db schema.DatabaseCredentials, id string, enable ...bool)

Types

type TestingT

type TestingT interface {
	Name() string
	require.TestingT
	Logf(format string, args ...interface{})
}

Jump to

Keyboard shortcuts

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