testutil

package
v0.0.0-...-9647dda Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitCondition

func WaitCondition(t *testing.T, final bool, comp assert.Comparison,
	msgAndArgs ...interface{}) bool

returns true if the comparison is true. If final is true, also asserts that that the comparison is true

func WaitEqual

func WaitEqual(t *testing.T, final bool, expected,
	actual interface{}, msgAndArgs ...interface{}) bool

returns true if the objects are equal. If final is true, also asserts that they are equal to the test interface

func WaitFor

func WaitFor(t *testing.T, desc string, timeout time.Duration,
	testFunc func(bool) (bool, error)) error

Wait for the predicate to become true by testing it repeatedly on a timer. Asserts a failure if the predicate does not become true before the timeout

func WaitForComp

func WaitForComp(t *testing.T, desc string, timeout time.Duration,
	cond assert.Comparison) error

Wait for the given condition to become true

func WaitNil

func WaitNil(t *testing.T, final bool, object interface{}, msgAndArgs ...interface{}) bool

returns true if the object is nil. If final is true, also asserts that that the object is nil.

func WaitNotEqual

func WaitNotEqual(t *testing.T, final bool, expected,
	actual interface{}, msgAndArgs ...interface{}) bool

returns true if the objects are not equal. If final is true, also asserts that they are not equal to the test interface

func WaitNotNil

func WaitNotNil(t *testing.T, final bool, object interface{}, msgAndArgs ...interface{}) bool

returns true if the object is not nil. If final is true, also asserts that that the object is not nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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