assert

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 13

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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