suite

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlakeRun added in v1.0.4

type FlakeRun struct {
	DeferCleanup    func(func(context.Context), ...interface{})
	RetryableExpect func(actual interface{}, extra ...interface{}) Assertion
}

type FlakyCode added in v1.0.4

type FlakyCode struct {
	Logger      logr.Logger
	FailHandler func(message string, callerSkip ...int)
}

FlakyCode can be used to run a test block multiple times until it succeeds. It will retry the test block the number of times specified by flakeAttempts. If the test block fails, the deferred cleanups will be run. If the test block succeeds, the deferred cleanups will not be run until the end of the entire test.

func (*FlakyCode) It added in v1.0.4

func (f *FlakyCode) It(ctx context.Context, description string, flakeAttempts int, body func(ctx context.Context, flakeRun FlakeRun))

Jump to

Keyboard shortcuts

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