testutils

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEmptyState

func AssertEmptyState(t *testing.T, s plan.Resource, r plan.Runner)

Other utilities

func ConnectSSH

func ConnectSSH(t *testing.T, r *FootlooseRunner) *ssh.Client

Types

type FootlooseRunner

type FootlooseRunner struct {
	Name    string
	SSHPort uint16
	Image   string
	// contains filtered or unexported fields
}

func (*FootlooseRunner) Close

func (r *FootlooseRunner) Close()

func (*FootlooseRunner) RunCommand

func (r *FootlooseRunner) RunCommand(ctx context.Context, command string, stdin io.Reader) (string, error)

func (*FootlooseRunner) Start

func (r *FootlooseRunner) Start() error

func (*FootlooseRunner) WrapInTestRunner

func (r *FootlooseRunner) WrapInTestRunner(t *testing.T) *TestRunner

type Operation

type Operation struct {
	Kind   string
	Arg    string
	Output string // for operations that output something on stdouterr, we keep it there.
}

type PortAllocator

type PortAllocator struct {
	Next uint16
	// contains filtered or unexported fields
}

func (*PortAllocator) Allocate

func (pa *PortAllocator) Allocate() uint16

type TestRunner

type TestRunner struct {
	T      *testing.T
	Runner plan.Runner
	// contains filtered or unexported fields
}

func MakeFootlooseTestRunner

func MakeFootlooseTestRunner(t *testing.T, image string, sshPort uint16) (*TestRunner, func())

func (*TestRunner) Operation

func (r *TestRunner) Operation(i int) Operation

func (*TestRunner) Operations

func (r *TestRunner) Operations() []Operation

func (*TestRunner) ResetOperations

func (r *TestRunner) ResetOperations()

func (*TestRunner) RunCommand

func (r *TestRunner) RunCommand(ctx context.Context, cmd string, stdin io.Reader) (stdouterr string, err error)

RunCommand implements plan.Runner.

Jump to

Keyboard shortcuts

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