Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqual ¶
AssertEqual fails the test if the actual error does not match the expected error. Similar to sigs.k8s.io/cli-utils/pkg/testutil.AssertEqual, but automatically wraps non-nil expected errors with testutil.EqualError to allow matching by type and string value.
This works around an issue with status.Error that breaks errors.Is(), which only compares the error code. Using testerrors.Equal, the assertion is more strict.
func EqualError ¶
EqualError returns an error with an Is(error)bool function that matches any error with the same type and string value as the supplied error.
Use with AssertEqual to handle error comparisons.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.