helpers

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertActual

func AssertActual(a actualAssertion, actual interface{}, msgAndArgs ...interface{}) error

assertActual is a helper function to allow the step function to call assertion functions where you want to compare an actual value to a predefined state like nil, empty or true/false.

func AssertExpectedAndActual

func AssertExpectedAndActual(a ExpectedAndActualAssertion, expected, actual interface{}, msgAndArgs ...interface{}) error

assertExpectedAndActual is a helper function to allow the step function to call assertion functions where you want to compare an expected and an actual value.

func FormatError

func FormatError(status *rpc.Status) error

func Retry added in v0.3.0

func Retry(f func() error, max int, delay time.Duration) error

Retry retries a function f max times with a delay between each attempt

Types

type Asserter

type Asserter struct {
	// contains filtered or unexported fields
}

asserter is used to be able to retrieve the error reported by the called assertion

func (*Asserter) Errorf

func (a *Asserter) Errorf(format string, args ...interface{})

Errorf is used by the called assertion to report an error

type ExpectedAndActualAssertion

type ExpectedAndActualAssertion func(t assert.TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool

Jump to

Keyboard shortcuts

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