kubernetes: k8s.io/kubernetes/pkg/kubelet/cadvisor/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing"

Index

Package Files

cadvisor_fake.go cadvisor_mock.go

Constants

const (
    // FakeKernelVersion is a fake kernel version for testing.
    FakeKernelVersion = "3.16.0-0.bpo.4-amd64"
    // FakeContainerOSVersion is a fake OS version for testing.
    FakeContainerOSVersion = "Debian GNU/Linux 7 (wheezy)"
)

type Fake Uses

type Fake struct {
    NodeName string
}

Fake cadvisor.Interface implementation.

func (*Fake) ContainerInfo Uses

func (c *Fake) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)

ContainerInfo is a fake implementation of Interface.ContainerInfo.

func (*Fake) ContainerInfoV2 Uses

func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)

ContainerInfoV2 is a fake implementation of Interface.ContainerInfoV2.

func (*Fake) DockerContainer Uses

func (c *Fake) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)

DockerContainer is a fake implementation of Interface.DockerContainer.

func (*Fake) GetDirFsInfo Uses

func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)

GetDirFsInfo is a fake implementation of Interface.GetDirFsInfo.

func (*Fake) ImagesFsInfo Uses

func (c *Fake) ImagesFsInfo() (cadvisorapiv2.FsInfo, error)

ImagesFsInfo is a fake implementation of Interface.ImagesFsInfo.

func (*Fake) MachineInfo Uses

func (c *Fake) MachineInfo() (*cadvisorapi.MachineInfo, error)

MachineInfo is a fake implementation of Interface.MachineInfo.

func (*Fake) RootFsInfo Uses

func (c *Fake) RootFsInfo() (cadvisorapiv2.FsInfo, error)

RootFsInfo is a fake implementation of Interface.RootFsInfo.

func (*Fake) Start Uses

func (c *Fake) Start() error

Start is a fake implementation of Interface.Start.

func (*Fake) SubcontainerInfo Uses

func (c *Fake) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)

SubcontainerInfo is a fake implementation of Interface.SubcontainerInfo.

func (*Fake) VersionInfo Uses

func (c *Fake) VersionInfo() (*cadvisorapi.VersionInfo, error)

VersionInfo is a fake implementation of Interface.VersionInfo.

func (*Fake) WatchEvents Uses

func (c *Fake) WatchEvents(request *events.Request) (*events.EventChannel, error)

WatchEvents is a fake implementation of Interface.WatchEvents.

type Mock Uses

type Mock struct {
    mock.Mock
}

Mock cadvisor.Interface implementation.

func (*Mock) ContainerInfo Uses

func (c *Mock) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)

ContainerInfo is a mock implementation of Interface.ContainerInfo.

func (*Mock) ContainerInfoV2 Uses

func (c *Mock) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)

ContainerInfoV2 is a mock implementation of Interface.ContainerInfoV2.

func (*Mock) DockerContainer Uses

func (c *Mock) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)

DockerContainer is a mock implementation of Interface.DockerContainer.

func (*Mock) GetDirFsInfo Uses

func (c *Mock) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)

GetDirFsInfo is a mock implementation of Interface.GetDirFsInfo.

func (*Mock) ImagesFsInfo Uses

func (c *Mock) ImagesFsInfo() (cadvisorapiv2.FsInfo, error)

ImagesFsInfo is a mock implementation of Interface.ImagesFsInfo.

func (*Mock) MachineInfo Uses

func (c *Mock) MachineInfo() (*cadvisorapi.MachineInfo, error)

MachineInfo is a mock implementation of Interface.MachineInfo.

func (*Mock) RootFsInfo Uses

func (c *Mock) RootFsInfo() (cadvisorapiv2.FsInfo, error)

RootFsInfo is a mock implementation of Interface.RootFsInfo.

func (*Mock) Start Uses

func (c *Mock) Start() error

Start is a mock implementation of Interface.Start.

func (*Mock) SubcontainerInfo Uses

func (c *Mock) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)

SubcontainerInfo is a mock implementation of Interface.SubcontainerInfo.

func (*Mock) VersionInfo Uses

func (c *Mock) VersionInfo() (*cadvisorapi.VersionInfo, error)

VersionInfo is a mock implementation of Interface.VersionInfo.

func (*Mock) WatchEvents Uses

func (c *Mock) WatchEvents(request *events.Request) (*events.EventChannel, error)

WatchEvents is a mock implementation of Interface.WatchEvents.

Package testing imports 5 packages (graph) and is imported by 25 packages. Updated 2019-08-02. Refresh now. Tools for package owners.