Documentation ¶
Overview ¶
Package base holds utility methods common to the base tests.
Index ¶
- func CleanUpContainers(ctx context.Context, containers []*dockerutil.Container)
- func RedisInstance(ctx context.Context, b *testing.B, machine harness.Machine) *dockerutil.Container
- func StartServer(ctx context.Context, b *testing.B, args ServerArgs) (*dockerutil.Container, error)
- func StartServers(ctx context.Context, b *testing.B, args ServerArgs) []*dockerutil.Container
- type ServerArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanUpContainers ¶
func CleanUpContainers(ctx context.Context, containers []*dockerutil.Container)
CleanUpContainers cleans up a slice of containers.
func RedisInstance ¶
func RedisInstance(ctx context.Context, b *testing.B, machine harness.Machine) *dockerutil.Container
RedisInstance returns a Redis container and its reachable IP.
func StartServer ¶
func StartServer(ctx context.Context, b *testing.B, args ServerArgs) (*dockerutil.Container, error)
StartServer starts a single server and cleans it up if it fails.
func StartServers ¶
func StartServers(ctx context.Context, b *testing.B, args ServerArgs) []*dockerutil.Container
StartServers starts b.N containers defined by 'runOpts' and 'cmd' and uses 'machine' to check that each is up.
Types ¶
type ServerArgs ¶
ServerArgs wraps args for startServers and runServerWorkload.
Click to show internal directories.
Click to hide internal directories.