testing

package
v1.13.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SandboxRuntimeClass is a valid RuntimeClass pre-populated in the populated dynamic client.
	SandboxRuntimeClass = "sandbox"
	// SandboxRuntimeHandler is the handler associated with the SandboxRuntimeClass.
	SandboxRuntimeHandler = "kata-containers"

	// EmptyRuntimeClass is a valid RuntimeClass without a handler pre-populated in the populated dynamic client.
	EmptyRuntimeClass = "native"
	// InvalidRuntimeClass is an invalid RuntimeClass pre-populated in the populated dynamic client.
	InvalidRuntimeClass = "foo"
)

Variables

This section is empty.

Functions

func NewPopulatedDynamicClient

func NewPopulatedDynamicClient() dynamic.Interface

NewPopulatedDynamicClient creates a dynamic client for use with the runtimeclass.Manager, and populates it with a few test RuntimeClass objects.

func NewUnstructuredRuntimeClass

func NewUnstructuredRuntimeClass(name, handler string) *unstructured.Unstructured

NewUnstructuredRuntimeClass is a helper to generate an unstructured RuntimeClass resource with the given name & handler.

func StartManagerSync

func StartManagerSync(t *testing.T, m *runtimeclass.Manager) func()

StartManagerSync runs the manager, and waits for startup by polling for the expected "native" RuntimeClass to be populated. Returns a function to stop the manager, which should be called with a defer:

defer StartManagerSync(t, m)()

Any errors are considered fatal to the test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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