testenv

package
v0.0.0-...-135780d Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

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

func NewIntegrationClient() *client.Client

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.

func StopKeaContainer

func StopKeaContainer()

StopKeaContainer stops the Docker container.

Types

This section is empty.

Jump to

Keyboard shortcuts

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