testing

package
v1.4.11-beta.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContainerName

func BuildContainerName(metadata *runtimeApi.ContainerMetadata) string

func BuildSandboxName

func BuildSandboxName(metadata *runtimeApi.PodSandboxMetadata) string

Types

type FakeContainer

type FakeContainer struct {
	// ContainerStatus contains the runtime information for a container.
	runtimeApi.ContainerStatus

	// the sandbox id of this container
	SandboxID string
}

type FakeImageService

type FakeImageService struct {
	sync.Mutex

	Called []string
	Images map[string]*runtimeApi.Image
}

func NewFakeImageService

func NewFakeImageService() *FakeImageService

func (*FakeImageService) ImageStatus

func (r *FakeImageService) ImageStatus(image *runtimeApi.ImageSpec) (*runtimeApi.Image, error)

func (*FakeImageService) ListImages

func (r *FakeImageService) ListImages(filter *runtimeApi.ImageFilter) ([]*runtimeApi.Image, error)

func (*FakeImageService) PullImage

func (r *FakeImageService) PullImage(image *runtimeApi.ImageSpec, auth *runtimeApi.AuthConfig) error

func (*FakeImageService) RemoveImage

func (r *FakeImageService) RemoveImage(image *runtimeApi.ImageSpec) error

func (*FakeImageService) SetFakeImages

func (r *FakeImageService) SetFakeImages(images []string)

type FakePodSandbox

type FakePodSandbox struct {
	// PodSandboxStatus contains the runtime information for a sandbox.
	runtimeApi.PodSandboxStatus
}

type FakeRuntimeService

type FakeRuntimeService struct {
	sync.Mutex

	Called []string

	Containers map[string]*FakeContainer
	Sandboxes  map[string]*FakePodSandbox
}

func NewFakeRuntimeService

func NewFakeRuntimeService() *FakeRuntimeService

func (*FakeRuntimeService) ContainerStatus

func (r *FakeRuntimeService) ContainerStatus(containerID string) (*runtimeApi.ContainerStatus, error)

func (*FakeRuntimeService) CreateContainer

func (r *FakeRuntimeService) CreateContainer(podSandboxID string, config *runtimeApi.ContainerConfig, sandboxConfig *runtimeApi.PodSandboxConfig) (string, error)

func (*FakeRuntimeService) CreatePodSandbox

func (r *FakeRuntimeService) CreatePodSandbox(config *runtimeApi.PodSandboxConfig) (string, error)

func (*FakeRuntimeService) Exec

func (r *FakeRuntimeService) Exec(containerID string, cmd []string, tty bool, stdin io.Reader, stdout, stderr io.WriteCloser) error

func (*FakeRuntimeService) ListContainers

func (r *FakeRuntimeService) ListContainers(filter *runtimeApi.ContainerFilter) ([]*runtimeApi.Container, error)

func (*FakeRuntimeService) ListPodSandbox

func (r *FakeRuntimeService) ListPodSandbox(filter *runtimeApi.PodSandboxFilter) ([]*runtimeApi.PodSandbox, error)

func (*FakeRuntimeService) PodSandboxStatus

func (r *FakeRuntimeService) PodSandboxStatus(podSandboxID string) (*runtimeApi.PodSandboxStatus, error)

func (*FakeRuntimeService) RemoveContainer

func (r *FakeRuntimeService) RemoveContainer(containerID string) error

func (*FakeRuntimeService) RemovePodSandbox

func (r *FakeRuntimeService) RemovePodSandbox(podSandboxID string) error

func (*FakeRuntimeService) SetFakeContainers

func (r *FakeRuntimeService) SetFakeContainers(containers []*FakeContainer)

func (*FakeRuntimeService) SetFakeSandboxes

func (r *FakeRuntimeService) SetFakeSandboxes(sandboxes []*FakePodSandbox)

func (*FakeRuntimeService) StartContainer

func (r *FakeRuntimeService) StartContainer(containerID string) error

func (*FakeRuntimeService) StopContainer

func (r *FakeRuntimeService) StopContainer(containerID string, timeout int64) error

func (*FakeRuntimeService) StopPodSandbox

func (r *FakeRuntimeService) StopPodSandbox(podSandboxID string) error

func (*FakeRuntimeService) Version

func (r *FakeRuntimeService) Version(apiVersion string) (*runtimeApi.VersionResponse, error)

Jump to

Keyboard shortcuts

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