base

package
v0.0.0-...-9ec6d29 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Overview

Package base holds utility methods common to the base tests.

Index

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 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

type ServerArgs struct {
	Machine harness.Machine
	Port    int
	RunOpts dockerutil.RunOpts
	Cmd     []string
}

ServerArgs wraps args for startServers and runServerWorkload.

Jump to

Keyboard shortcuts

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