testing

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryForMockContainerHandler

type FactoryForMockContainerHandler struct {
	Name                        string
	PrepareContainerHandlerFunc func(name string, handler *MockContainerHandler)
}

func (*FactoryForMockContainerHandler) CanHandle

func (self *FactoryForMockContainerHandler) CanHandle(name string) bool

func (*FactoryForMockContainerHandler) NewContainerHandler

func (self *FactoryForMockContainerHandler) NewContainerHandler(name string, inHostNamespace bool) (container.ContainerHandler, error)

func (*FactoryForMockContainerHandler) String

func (self *FactoryForMockContainerHandler) String() string

type MockContainerHandler

type MockContainerHandler struct {
	mock.Mock
	Name    string
	Aliases []string
}

This struct mocks a container handler.

func NewMockContainerHandler

func NewMockContainerHandler(containerName string) *MockContainerHandler

func (*MockContainerHandler) Cleanup

func (self *MockContainerHandler) Cleanup()

func (*MockContainerHandler) ContainerReference

func (self *MockContainerHandler) ContainerReference() (info.ContainerReference, error)

If self.Name is not empty, then ContainerReference() will return self.Name and self.Aliases. Otherwise, it will use the value provided by .On().Return().

func (*MockContainerHandler) Exists

func (self *MockContainerHandler) Exists() bool

func (*MockContainerHandler) GetCgroupPath

func (self *MockContainerHandler) GetCgroupPath(path string) (string, error)

func (*MockContainerHandler) GetContainerIPAddress

func (self *MockContainerHandler) GetContainerIPAddress() string

func (*MockContainerHandler) GetContainerLabels

func (self *MockContainerHandler) GetContainerLabels() map[string]string

func (*MockContainerHandler) GetSpec

func (self *MockContainerHandler) GetSpec() (info.ContainerSpec, error)

func (*MockContainerHandler) GetStats

func (self *MockContainerHandler) GetStats() (*info.ContainerStats, error)

func (*MockContainerHandler) ListContainers

func (self *MockContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error)

func (*MockContainerHandler) ListProcesses

func (self *MockContainerHandler) ListProcesses(listType container.ListType) ([]int, error)

func (*MockContainerHandler) Start

func (self *MockContainerHandler) Start()

func (*MockContainerHandler) Type

Jump to

Keyboard shortcuts

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