Documentation
¶
Index ¶
- func ExpectCommand(t *testing.T, wantCommand string, wantService ...client.Service) func(*testing.T, client.CommandRequest)
- func MustEncodeRawJSON(t *testing.T, v interface{}) json.RawMessage
- func NewIntegrationClient() *client.Client
- func NewMockClient(t *testing.T, validate func(t *testing.T, req client.CommandRequest), ...) *client.Client
- func StartKeaContainer() error
- func StopKeaContainer()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectCommand ¶
func ExpectCommand(t *testing.T, wantCommand string, wantService ...client.Service) func(*testing.T, client.CommandRequest)
ExpectCommand returns a function that can be used to validate a CommandRequest.
func MustEncodeRawJSON ¶
func MustEncodeRawJSON(t *testing.T, v interface{}) json.RawMessage
MustEncodeRawJSON marshals a value into json.RawMessage.
func NewIntegrationClient ¶
NewIntegrationTestClient returns a default HTTP client for integration tests.
func NewMockClient ¶
func NewMockClient( t *testing.T, validate func(t *testing.T, req client.CommandRequest), responses []client.CommandResponse, ) *client.Client
NewMockClient returns a mock *client.Client that expects a specific request (validated by the test function) and returns the given responses.
func StartKeaContainer ¶
func StartKeaContainer() error
StartKeaContainer starts the Docker container for integration testing.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.