assert

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 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 interface{}, msgAndArgs ...interface{})

Equal checks that actual is as expected, it panics otherwise

func Error

func Error(err error, msgAndArgs ...interface{})

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 ...interface{})

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 ...interface{})

func False

func False(value bool, msgAndArgs ...interface{})

func NoError

func NoError(err error, msgAndArgs ...interface{})

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

func NotEmpty

func NotEmpty(o interface{}, msgAndArgs ...interface{})

func NotEqual

func NotEqual(expected, actual interface{}, msgAndArgs ...interface{})

func NotNil

func NotNil(object interface{}, msgAndArgs ...interface{})

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 ...interface{})

func ValidIdentity

func ValidIdentity(id view.Identity, err error, msgAndArgs ...interface{}) 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