functional

package
v0.16.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Path    string
	ImageID string
	// contains filtered or unexported fields
}

Container represents a running container

func NewContainer

func NewContainer(t *testing.T, path string) *Container

NewContainer returns a new container testing object

func (*Container) Build

func (c *Container) Build(buildargs ...string) error

Build executes docker build

func (*Container) Run

func (c *Container) Run(runargs ...string) error

Run executes docker run

func (*Container) RunContext

func (c *Container) RunContext(ctx context.Context, runargs ...string) error

RunContext executes docker run with a context object

func (*Container) Start

func (c *Container) Start(runargs ...string) error

Start executes docker start

func (*Container) StartContext

func (c *Container) StartContext(ctx context.Context, runargs ...string) error

StartContext executes docker start with a context object

func (*Container) Wait

func (c *Container) Wait() error

Wait executes docker wait

type TelemetryTest

type TelemetryTest interface {
	// Build the container used for testing. Returns the imageID
	// of the container image or the empty string to not filter
	// telemetry to containers running the built image.
	BuildContainer(t *testing.T) string

	// Run the container used for testing.
	RunContainer(t *testing.T)

	// create and return telemetry subscription to use for the test
	CreateSubscription(t *testing.T) *telemetryAPI.Subscription

	// return true to keep going, false if done
	HandleTelemetryEvent(t *testing.T, te *telemetryAPI.ReceivedTelemetryEvent) bool
}

TelemetryTest should be implemented by tests of the telemtry service

type TelemetryTester

type TelemetryTester struct {
	// contains filtered or unexported fields
}

TelemetryTester is used for

func NewTelemetryTester

func NewTelemetryTester(tt TelemetryTest) *TelemetryTester

NewTelemetryTester returns a pointer to a new TelemtryTester

func (*TelemetryTester) RunTest

func (tt *TelemetryTester) RunTest(t *testing.T)

RunTest runs the TelemetryTester's test

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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