Documentation
¶
Index ¶
- Constants
- func EmptyGlobalProtoRegistry()
- func Logger(t *testing.T) bridgelog.Logger
- func MustGRPCServer(tb testing.TB, prepareFuncs ...func(*grpc.Server)) (*grpc.Server, *grpcadapter.AdaptedClientPool, grpcadapter.ClientConn)
- func StatusCodeIs(err error, wantCode codes.Code) error
- func StatusCodeOneOf(err error, wantCodes ...codes.Code) error
- func StatusIs(err error, wantStatus *status.Status) error
Constants ¶
View Source
const ( TestTargetName = "bridgetest" TestDialTarget = "passthrough:///bridgetest" )
Variables ¶
This section is empty.
Functions ¶
func EmptyGlobalProtoRegistry ¶
func EmptyGlobalProtoRegistry()
EmptyGlobalProtoRegistry empties the global proto registries, which is needed for testing to simulate lack of PB information in grpcbridge's global registries, as it will be during real use where proto registries are constructed on the fly for each target.
func MustGRPCServer ¶
func MustGRPCServer(tb testing.TB, prepareFuncs ...func(*grpc.Server)) (*grpc.Server, *grpcadapter.AdaptedClientPool, grpcadapter.ClientConn)
func StatusCodeIs ¶
StatusCodeIs checks that the error has the specified gRPC status code.
func StatusCodeOneOf ¶ added in v0.1.0
StatusCodeOneOf checks that the error has one of the specified gRPC status codes. This is useful for checks like Canceled/Unavailable, where one of these codes is valid for a closing connection.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.