Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeRequestAndExpectEventuallyConsistentResponse ¶
func MakeRequestAndExpectEventuallyConsistentResponse(t *testing.T, c Client, timeoutConfig config.TimeoutConfig, gwAddr string, expected ExpectedResponse)
Types ¶
type Client ¶ added in v1.1.1
type Client interface { SendRPC(t *testing.T, address string, expected ExpectedResponse, timeout time.Duration) (*Response, error) Close() }
Client is an interface used to make requests within conformance tests for grpc scenarios. This can be overridden with custom implementations whenever necessary.
type DefaultClient ¶ added in v1.1.1
type DefaultClient struct {
Conn *grpc.ClientConn
}
DefaultClient is the default implementation of Client. It will be used if a custom implementation is not specified.
func (*DefaultClient) Close ¶ added in v1.1.1
func (c *DefaultClient) Close()
func (*DefaultClient) SendRPC ¶ added in v1.1.1
func (c *DefaultClient) SendRPC(t *testing.T, address string, expected ExpectedResponse, timeout time.Duration) (*Response, error)
SendRPC sends a gRPC request to the given address with the expected response. An error will be returned if there is an error running the function but not if an HTTP error status code is received.
type ExpectedResponse ¶
type ExpectedResponse struct { // Defines the request to make. Only one of EchoRequest and EchoTwoRequest // may be set. EchoRequest *pb.EchoRequest EchoTwoRequest *pb.EchoRequest EchoThreeRequest *pb.EchoRequest // Metadata describing the outgoing request. RequestMetadata *RequestMetadata // Response defines what response the test case // should receive. Response Response Backend string Namespace string // User Given TestCase name TestCaseName string }
ExpectedResponse defines the response expected for a given request.
func (*ExpectedResponse) GetTestCaseName ¶
func (er *ExpectedResponse) GetTestCaseName(i int) string
type RequestMetadata ¶
Click to show internal directories.
Click to hide internal directories.