Documentation ¶
Index ¶
- func ShouldResembleProto(actual interface{}, expected ...interface{}) string
- func VerifyGrpcError(actual error, expect errors.GrpcError)
- type Container
- type DockerInstance
- type Response
- type TestDatabaseOptions
- type TestGrpcServer
- type TestHttpServer
- func (c *TestHttpServer) MustDoForm(t *testing.T, method string, url string, reqBody url.Values, ...) *Response
- func (c *TestHttpServer) MustDoJSON(t *testing.T, method string, url string, reqBody interface{}, ...) *Response
- func (c *TestHttpServer) MustFailedForm(t *testing.T, method string, path string, reqBody url.Values, ...)
- func (c *TestHttpServer) MustFailedJSON(t *testing.T, method string, path string, reqBody interface{}, ...)
- func (c *TestHttpServer) WithCookie(value string) *TestHttpServer
- func (c *TestHttpServer) WithHeader(key string, value string) *TestHttpServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShouldResembleProto ¶
func ShouldResembleProto(actual interface{}, expected ...interface{}) string
ShouldResembleProto asserts that given two values that contain proto messages are equal by comparing their types and ensuring they serialize to the same text representation.
Values can either each be a proto.Message or a slice of values that each implement proto.Message interface.
func VerifyGrpcError ¶ added in v0.2.0
Types ¶
type DockerInstance ¶ added in v0.2.0
type DockerInstance struct { Pool *dockertest.Pool Container *dockertest.Resource }
func NewDockerInstance ¶ added in v0.2.0
func NewDockerInstance(opts TestDatabaseOptions) (*DockerInstance, error)
func (*DockerInstance) Close ¶ added in v0.2.0
func (d *DockerInstance) Close(close func() error) (retErr error)
func (*DockerInstance) MustClose ¶ added in v0.2.0
func (d *DockerInstance) MustClose(close func() error)
type TestDatabaseOptions ¶ added in v0.2.0
type TestGrpcServer ¶ added in v0.2.0
func NewTestGrpcServer ¶ added in v0.2.0
func NewTestGrpcServer(ctx context.Context) *TestGrpcServer
func (*TestGrpcServer) Dial ¶ added in v0.2.0
func (t *TestGrpcServer) Dial() *grpc.ClientConn
func (*TestGrpcServer) Start ¶ added in v0.2.0
func (t *TestGrpcServer) Start()
func (*TestGrpcServer) Stop ¶ added in v0.2.0
func (t *TestGrpcServer) Stop()
type TestHttpServer ¶ added in v0.2.0
func NewTestHttpServer ¶ added in v0.2.0
func NewTestHttpServer(controller httpApp.Controller) TestHttpServer
func (*TestHttpServer) MustDoForm ¶ added in v0.2.0
func (*TestHttpServer) MustDoJSON ¶ added in v0.2.0
func (*TestHttpServer) MustFailedForm ¶ added in v0.2.0
func (*TestHttpServer) MustFailedJSON ¶ added in v0.2.0
func (*TestHttpServer) WithCookie ¶ added in v0.2.0
func (c *TestHttpServer) WithCookie(value string) *TestHttpServer
func (*TestHttpServer) WithHeader ¶ added in v0.2.0
func (c *TestHttpServer) WithHeader(key string, value string) *TestHttpServer
Click to show internal directories.
Click to hide internal directories.