testutil

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocOpenBindAddr added in v1.9.0

func AllocOpenBindAddr(t *testing.T) string

func InstallZapLogger

func InstallZapLogger(t *testing.T)

InstallZapLogger sets up a global zap logger for testing purposes.

func NewTestLogger added in v1.9.0

func NewTestLogger(t *testing.T) *zap.Logger

NewTestLogger creates a zap logger for testing that outputs to the test log.

func OperationsWithDefaults

func OperationsWithDefaults(op *v1.Operation, ops []*v1.Operation) []*v1.Operation

func RandomOperation

func RandomOperation() *v1.Operation

func Retry

func Retry(t *testing.T, ctx context.Context, f func() error) error

func Try

func Try(t *testing.T, ctx context.Context, f func() error)

try is a helper that spins until the condition becomes true OR the context is done.

func TryNonfatal

func TryNonfatal(t *testing.T, ctx context.Context, f func() error)

func WithDeadlineFromTest

func WithDeadlineFromTest(t *testing.T, ctx context.Context) (context.Context, context.CancelFunc)

Types

This section is empty.

Jump to

Keyboard shortcuts

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