testutils

package
v1.0.0-beta.232 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NameGenerator = newNameGenerator()

Functions

func EventuallyWithTf

func EventuallyWithTf(t *testing.T, fn func(c *assert.CollectT, saveErr func(err any)), wait time.Duration, interval time.Duration)

func GetRFC3339Time

func GetRFC3339Time(t *testing.T, timeString string) time.Time

func NewDiscardLogger

func NewDiscardLogger(t testing.TB) *slog.Logger

func NewLogger

func NewLogger(t testing.TB) *slog.Logger

func TimeEqualsApproximately

func TimeEqualsApproximately(t *testing.T, expected time.Time, actual time.Time, tolerance time.Duration)

Types

type GeneratedName

type GeneratedName struct {
	Key  string
	Name string
}

type PostgresDBState

type PostgresDBState uint8
const (
	PostgresDBStateEmpty PostgresDBState = iota
	PostgresDBStateEntMigrated
	PostgresDBStateAtlasMigrated
)

type TestDB

type TestDB struct {
	EntDriver *entdriver.EntPostgresDriver
	PGDriver  *pgdriver.Driver
	URL       string
}

func InitPostgresDB

func InitPostgresDB(t testing.TB, state PostgresDBState) *TestDB

func (*TestDB) Close

func (d *TestDB) Close(t testing.TB)

Jump to

Keyboard shortcuts

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