testutil

package
v0.0.0-...-a9d0937 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqPrefixedStatus

func EqPrefixedStatus(status error) gomock.Matcher

EqPrefixedStatus is a gomock matcher for gRPC status equality allowing trailing characters in the message.

func EqProto

func EqProto(t *testing.T, proto proto.Message) gomock.Matcher

EqProto is a gomock matcher for proto equality.

func EqStatus

func EqStatus(t *testing.T, s error) gomock.Matcher

EqStatus is a gomock matcher for gRPC status equality.

func RequireEqualProto

func RequireEqualProto(t *testing.T, want, got proto.Message)

RequireEqualProto asserts that the two passed protocol buffer messages are equal.

Because maps in protocol buffers aren't serialized deterministically (and can be embedded into google.protobuf.Any values), this function falls back to doing a string comparison upon failure.

func RequireEqualStatus

func RequireEqualStatus(t *testing.T, want, got error)

RequireEqualStatus asserts that two grpc Statuses are equal.

func RequirePrefixedStatus

func RequirePrefixedStatus(t *testing.T, want, got error)

RequirePrefixedStatus compares that two errors, assumed to be grpc Statuses, are the same, except got may have extra trailing characters in its message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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