assert

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(expected, actual any, msgAndArgs ...any)

Equal checks that actual is as expected, it panics otherwise

func Error

func Error(err error, msgAndArgs ...any)

Error checks that the passed error is not nil, it panics otherwise

func EventuallyWithRetry

func EventuallyWithRetry(t *testing.T, attempts int, sleep time.Duration, f func() error, msgAndArgs ...any)

EventuallyWithRetry will call the function provided, and asserts that the function returns with no error within the provided number of attempts.

func Fail

func Fail(failureMessage string, msgAndArgs ...any)

func False

func False(value bool, msgAndArgs ...any)

func NoError

func NoError(err error, msgAndArgs ...any)

NoError checks that the passed error is nil, it panics otherwise

func NotEmpty

func NotEmpty(o any, msgAndArgs ...any)

func NotEqual

func NotEqual(expected, actual any, msgAndArgs ...any)

func NotNil

func NotNil(object any, msgAndArgs ...any)

func Retry

func Retry(attempts int, sleep time.Duration, f func() error) (err error)

Retry retries the given function until it returns nil or the given number of attempts has been reached.

func True

func True(value bool, msgAndArgs ...any)

func ValidIdentity

func ValidIdentity(id view.Identity, err error, msgAndArgs ...any) view.Identity

ValidIdentity checks that the passed error is nil and id is not empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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