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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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