errortest

package
v1.62.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertError

func AssertError(t *testing.T, err error, expectedErrors ...error) bool

AssertError asserts that the error is matching one of the `expectedErrors` This is a wrapper for commonerrors.Any.

func AssertErrorDescription added in v1.42.0

func AssertErrorDescription(t *testing.T, err error, expectedErrorDescriptions ...string) bool

AssertErrorDescription asserts that the error description corresponds to one of the `expectedErrorDescriptions` This is a wrapper for commonerrors.CorrespondTo.

func RequireError

func RequireError(t *testing.T, err error, expectedErrors ...error)

RequireError requires that the error is matching one of the `expectedErrors` This is a wrapper for commonerrors.Any.

func RequireErrorDescription added in v1.42.0

func RequireErrorDescription(t *testing.T, err error, expectedErrorDescriptions ...string)

RequireErrorDescription requires that the error description corresponds to one of the `expectedErrorDescriptions` This is a wrapper for commonerrors.CorrespondTo.

Types

This section is empty.

Jump to

Keyboard shortcuts

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