framework

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package framework has utility functions and helpers for running integration rktlet tests

Index

Constants

This section is empty.

Variables

View Source
var (
	TestImageBusybox = "busybox:1.25.1"
	TestImageFedora  = "fedora:25"
)

All test images should be listed here so they can be prepulled

Functions

func RequireRoot

func RequireRoot(t *testing.T)

Types

type Pod

type Pod struct {
	Name      string
	SandboxId string
	Metadata  *runtime.PodSandboxMetadata
	LogDir    string
	// contains filtered or unexported fields
}

func (*Pod) ContainerID

func (p *Pod) ContainerID(ctx context.Context, name string) (string, error)

func (*Pod) RunContainerToExit

func (p *Pod) RunContainerToExit(ctx context.Context, cfg *runtime.ContainerConfig) (string, int32)

RunContainerToExit runs a container and returns its exit code

func (*Pod) WaitStable

func (p *Pod) WaitStable(ctx context.Context, numContainers int) error

WaitStable waits for the given pod to be in a 'running' state and for at least numContainers of its containers to likewise be running

type TestContext

type TestContext struct {
	*testing.T
	Rktlet rktlet.ContainerAndImageService
	TmpDir string
	LogDir string
	// contains filtered or unexported fields
}

func Setup

func Setup(t *testing.T) *TestContext

func (*TestContext) ImageRef

func (t *TestContext) ImageRef(key string) string

func (*TestContext) PullImages

func (t *TestContext) PullImages()

func (*TestContext) RunPod

func (t *TestContext) RunPod(name string, partialConfig *runtime.PodSandboxConfig) *Pod

RunPod runs a pod for a test of the given name. The provided 'partialConfig' is optional and essential fields will be set (or overridden)

func (*TestContext) Teardown

func (t *TestContext) Teardown()

Jump to

Keyboard shortcuts

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