testing

package
v1.25.2-rc.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 17 Imported by: 103

Documentation ¶

Overview ¶

Package testing is a generated GoMock package.

Package testing is a generated GoMock package.

Index ¶

Constants ¶

View Source
const FakeHost = "localhost:12345"

Variables ¶

This section is empty.

Functions ¶

func NewFakeCache ¶

func NewFakeCache(runtime container.Runtime) container.Cache

func NewFakeRuntimeCache ¶

func NewFakeRuntimeCache(getter podsGetter) kubecontainer.RuntimeCache

Types ¶

type FakeContainerCommandRunner ¶ added in v1.5.0

type FakeContainerCommandRunner struct {
	// what to return
	Stdout string
	Err    error

	// actual values when invoked
	ContainerID kubecontainer.ContainerID
	Cmd         []string
}

func (*FakeContainerCommandRunner) RunInContainer ¶ added in v1.5.0

func (f *FakeContainerCommandRunner) RunInContainer(containerID kubecontainer.ContainerID, cmd []string, timeout time.Duration) ([]byte, error)

type FakeOS ¶

type FakeOS struct {
	StatFn     func(string) (os.FileInfo, error)
	ReadDirFn  func(string) ([]os.FileInfo, error)
	MkdirAllFn func(string, os.FileMode) error
	SymlinkFn  func(string, string) error
	GlobFn     func(string, string) bool
	HostName   string
	Removes    []string
	Files      map[string][]*os.FileInfo
}

FakeOS mocks out certain OS calls to avoid perturbing the filesystem If a member of the form `*Fn` is set, that function will be called in place of the real call.

func NewFakeOS ¶ added in v1.3.0

func NewFakeOS() *FakeOS

func (FakeOS) Chmod ¶ added in v1.6.0

func (FakeOS) Chmod(path string, perm os.FileMode) error

Chmod is a fake call that returns nil.

func (FakeOS) Chtimes ¶ added in v1.3.0

func (FakeOS) Chtimes(path string, atime time.Time, mtime time.Time) error

Chtimes is a fake call that returns nil.

func (*FakeOS) Create ¶ added in v1.3.0

func (f *FakeOS) Create(path string) (*os.File, error)

Create is a fake call that creates a virtual file and returns nil.

func (*FakeOS) Glob ¶ added in v1.5.0

func (f *FakeOS) Glob(pattern string) ([]string, error)

Glob is a fake call that returns list of virtual files matching a pattern.

func (*FakeOS) Hostname ¶ added in v1.3.0

func (f *FakeOS) Hostname() (name string, err error)

Hostname is a fake call that returns nil.

func (*FakeOS) MkdirAll ¶ added in v1.3.0

func (f *FakeOS) MkdirAll(path string, perm os.FileMode) error

Mkdir is a fake call that just returns nil.

func (FakeOS) Open ¶ added in v1.17.12

func (FakeOS) Open(name string) (*os.File, error)

Open is a fake call that returns nil.

func (FakeOS) OpenFile ¶ added in v1.17.12

func (FakeOS) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)

OpenFile is a fake call that return nil.

func (FakeOS) Pipe ¶ added in v1.3.0

func (FakeOS) Pipe() (r *os.File, w *os.File, err error)

Pipe is a fake call that returns nil.

func (*FakeOS) ReadDir ¶ added in v1.3.0

func (f *FakeOS) ReadDir(dirname string) ([]os.FileInfo, error)

ReadDir is a fake call that returns the files under the directory.

func (*FakeOS) Remove ¶ added in v1.3.0

func (f *FakeOS) Remove(path string) error

Remove is a fake call that returns nil.

func (*FakeOS) RemoveAll ¶ added in v1.5.0

func (f *FakeOS) RemoveAll(path string) error

RemoveAll is a fake call that just returns nil.

func (FakeOS) Rename ¶ added in v1.17.12

func (FakeOS) Rename(oldpath, newpath string) error

Rename is a fake call that return nil.

func (FakeOS) Stat ¶ added in v1.3.0

func (f FakeOS) Stat(path string) (os.FileInfo, error)

Stat is a fake that returns an error

func (f *FakeOS) Symlink(oldname string, newname string) error

Symlink is a fake call that just returns nil.

type FakePod ¶ added in v1.3.0

type FakePod struct {
	Pod       *kubecontainer.Pod
	NetnsPath string
}

type FakeRuntime ¶

type FakeRuntime struct {
	sync.Mutex
	CalledFunctions   []string
	PodList           []*FakePod
	AllPodList        []*FakePod
	ImageList         []kubecontainer.Image
	APIPodStatus      v1.PodStatus
	PodStatus         kubecontainer.PodStatus
	StartedPods       []string
	KilledPods        []string
	StartedContainers []string
	KilledContainers  []string
	RuntimeStatus     *kubecontainer.RuntimeStatus
	VersionInfo       string
	APIVersionInfo    string
	RuntimeType       string
	Err               error
	InspectErr        error
	StatusErr         error
	T                 *testing.T
}

FakeRuntime is a fake container runtime for testing.

func (*FakeRuntime) APIVersion ¶

func (f *FakeRuntime) APIVersion() (kubecontainer.Version, error)

func (*FakeRuntime) AssertCalls ¶

func (f *FakeRuntime) AssertCalls(calls []string) bool

AssertCalls test if the invoked functions are as expected.

func (*FakeRuntime) AssertKilledContainers ¶

func (f *FakeRuntime) AssertKilledContainers(containers []string) bool

func (*FakeRuntime) AssertKilledPods ¶

func (f *FakeRuntime) AssertKilledPods(pods []string) bool

func (*FakeRuntime) AssertStartedContainers ¶

func (f *FakeRuntime) AssertStartedContainers(containers []string) bool

func (*FakeRuntime) AssertStartedPods ¶

func (f *FakeRuntime) AssertStartedPods(pods []string) bool

func (*FakeRuntime) CheckpointContainer ¶ added in v1.25.0

func (f *FakeRuntime) CheckpointContainer(options *runtimeapi.CheckpointContainerRequest) error

func (*FakeRuntime) ClearCalls ¶

func (f *FakeRuntime) ClearCalls()

ClearCalls resets the FakeRuntime to the initial state.

func (*FakeRuntime) DeleteContainer ¶ added in v1.4.0

func (f *FakeRuntime) DeleteContainer(containerID kubecontainer.ContainerID) error

func (*FakeRuntime) GarbageCollect ¶

func (f *FakeRuntime) GarbageCollect(gcPolicy kubecontainer.GCPolicy, ready bool, evictNonDeletedPods bool) error

func (*FakeRuntime) GetContainerLogs ¶

func (f *FakeRuntime) GetContainerLogs(_ context.Context, pod *v1.Pod, containerID kubecontainer.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) (err error)

func (*FakeRuntime) GetImageRef ¶ added in v1.6.0

func (f *FakeRuntime) GetImageRef(image kubecontainer.ImageSpec) (string, error)

func (*FakeRuntime) GetPodStatus ¶

func (f *FakeRuntime) GetPodStatus(uid types.UID, name, namespace string) (*kubecontainer.PodStatus, error)

func (*FakeRuntime) GetPods ¶

func (f *FakeRuntime) GetPods(all bool) ([]*kubecontainer.Pod, error)

func (*FakeRuntime) ImageStats ¶ added in v1.3.0

func (f *FakeRuntime) ImageStats() (*kubecontainer.ImageStats, error)

func (*FakeRuntime) KillContainerInPod ¶

func (f *FakeRuntime) KillContainerInPod(container v1.Container, pod *v1.Pod) error

func (*FakeRuntime) KillPod ¶

func (f *FakeRuntime) KillPod(pod *v1.Pod, runningPod kubecontainer.Pod, gracePeriodOverride *int64) error

func (*FakeRuntime) ListImages ¶

func (f *FakeRuntime) ListImages() ([]kubecontainer.Image, error)

func (*FakeRuntime) PullImage ¶

func (f *FakeRuntime) PullImage(image kubecontainer.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, error)

func (*FakeRuntime) RemoveImage ¶

func (f *FakeRuntime) RemoveImage(image kubecontainer.ImageSpec) error

func (*FakeRuntime) RunContainerInPod ¶

func (f *FakeRuntime) RunContainerInPod(container v1.Container, pod *v1.Pod, volumeMap map[string]volume.VolumePlugin) error

func (*FakeRuntime) Status ¶

func (f *FakeRuntime) Status() (*kubecontainer.RuntimeStatus, error)

func (*FakeRuntime) SyncPod ¶

func (f *FakeRuntime) SyncPod(pod *v1.Pod, _ *kubecontainer.PodStatus, _ []v1.Secret, backOff *flowcontrol.Backoff) (result kubecontainer.PodSyncResult)

func (*FakeRuntime) Type ¶

func (f *FakeRuntime) Type() string

func (*FakeRuntime) UpdatePodCIDR ¶ added in v1.5.0

func (f *FakeRuntime) UpdatePodCIDR(c string) error

UpdatePodCIDR fulfills the cri interface.

func (*FakeRuntime) Version ¶

func (f *FakeRuntime) Version() (kubecontainer.Version, error)

type FakeRuntimeCache ¶

type FakeRuntimeCache struct {
	// contains filtered or unexported fields
}

func (*FakeRuntimeCache) ForceUpdateIfOlder ¶

func (f *FakeRuntimeCache) ForceUpdateIfOlder(time.Time) error

func (*FakeRuntimeCache) GetPods ¶

func (f *FakeRuntimeCache) GetPods() ([]*kubecontainer.Pod, error)

type FakeRuntimeHelper ¶ added in v1.6.0

type FakeRuntimeHelper struct {
	DNSServers      []string
	DNSSearches     []string
	DNSOptions      []string
	HostName        string
	HostDomain      string
	PodContainerDir string
	Err             error
}

FakeRuntimeHelper implements RuntimeHelper interfaces for testing purposes.

func (*FakeRuntimeHelper) GeneratePodHostNameAndDomain ¶ added in v1.6.0

func (f *FakeRuntimeHelper) GeneratePodHostNameAndDomain(pod *v1.Pod) (string, string, error)

This is not used by docker runtime.

func (*FakeRuntimeHelper) GenerateRunContainerOptions ¶ added in v1.6.0

func (f *FakeRuntimeHelper) GenerateRunContainerOptions(pod *v1.Pod, container *v1.Container, podIP string, podIPs []string) (*kubecontainer.RunContainerOptions, func(), error)

func (*FakeRuntimeHelper) GetExtraSupplementalGroupsForPod ¶ added in v1.6.0

func (f *FakeRuntimeHelper) GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64

func (*FakeRuntimeHelper) GetOrCreateUserNamespaceMappings ¶ added in v1.25.0

func (f *FakeRuntimeHelper) GetOrCreateUserNamespaceMappings(pod *v1.Pod) (*runtimeapi.UserNamespace, error)

func (*FakeRuntimeHelper) GetPodCgroupParent ¶ added in v1.6.0

func (f *FakeRuntimeHelper) GetPodCgroupParent(pod *v1.Pod) string

func (*FakeRuntimeHelper) GetPodDNS ¶ added in v1.9.0

func (f *FakeRuntimeHelper) GetPodDNS(pod *v1.Pod) (*runtimeapi.DNSConfig, error)

func (*FakeRuntimeHelper) GetPodDir ¶ added in v1.6.0

func (f *FakeRuntimeHelper) GetPodDir(podUID kubetypes.UID) string

type FakeStreamingRuntime ¶ added in v1.11.0

type FakeStreamingRuntime struct {
	*FakeRuntime
}

func (*FakeStreamingRuntime) GetAttach ¶ added in v1.11.0

func (f *FakeStreamingRuntime) GetAttach(id kubecontainer.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error)

func (*FakeStreamingRuntime) GetExec ¶ added in v1.11.0

func (f *FakeStreamingRuntime) GetExec(id kubecontainer.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error)

func (*FakeStreamingRuntime) GetPortForward ¶ added in v1.11.0

func (f *FakeStreamingRuntime) GetPortForward(podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error)

type FakeVersion ¶

type FakeVersion struct {
	Version string
}

func (*FakeVersion) Compare ¶

func (fv *FakeVersion) Compare(other string) (int, error)

func (*FakeVersion) String ¶

func (fv *FakeVersion) String() string

type MockAttacher ¶ added in v1.23.0

type MockAttacher struct {
	// contains filtered or unexported fields
}

MockAttacher is a mock of Attacher interface.

func NewMockAttacher ¶ added in v1.23.0

func NewMockAttacher(ctrl *gomock.Controller) *MockAttacher

NewMockAttacher creates a new mock instance.

func (*MockAttacher) AttachContainer ¶ added in v1.23.0

func (m *MockAttacher) AttachContainer(id container.ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error

AttachContainer mocks base method.

func (*MockAttacher) EXPECT ¶ added in v1.23.0

EXPECT returns an object that allows the caller to indicate expected use.

type MockAttacherMockRecorder ¶ added in v1.23.0

type MockAttacherMockRecorder struct {
	// contains filtered or unexported fields
}

MockAttacherMockRecorder is the mock recorder for MockAttacher.

func (*MockAttacherMockRecorder) AttachContainer ¶ added in v1.23.0

func (mr *MockAttacherMockRecorder) AttachContainer(id, stdin, stdout, stderr, tty, resize interface{}) *gomock.Call

AttachContainer indicates an expected call of AttachContainer.

type MockCommandRunner ¶ added in v1.23.0

type MockCommandRunner struct {
	// contains filtered or unexported fields
}

MockCommandRunner is a mock of CommandRunner interface.

func NewMockCommandRunner ¶ added in v1.23.0

func NewMockCommandRunner(ctrl *gomock.Controller) *MockCommandRunner

NewMockCommandRunner creates a new mock instance.

func (*MockCommandRunner) EXPECT ¶ added in v1.23.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCommandRunner) RunInContainer ¶ added in v1.23.0

func (m *MockCommandRunner) RunInContainer(id container.ContainerID, cmd []string, timeout time.Duration) ([]byte, error)

RunInContainer mocks base method.

type MockCommandRunnerMockRecorder ¶ added in v1.23.0

type MockCommandRunnerMockRecorder struct {
	// contains filtered or unexported fields
}

MockCommandRunnerMockRecorder is the mock recorder for MockCommandRunner.

func (*MockCommandRunnerMockRecorder) RunInContainer ¶ added in v1.23.0

func (mr *MockCommandRunnerMockRecorder) RunInContainer(id, cmd, timeout interface{}) *gomock.Call

RunInContainer indicates an expected call of RunInContainer.

type MockFileInfo ¶ added in v1.5.0

type MockFileInfo struct {
	// contains filtered or unexported fields
}

Mock of FileInfo interface

func NewMockFileInfo ¶ added in v1.5.0

func NewMockFileInfo(ctrl *gomock.Controller) *MockFileInfo

func (*MockFileInfo) EXPECT ¶ added in v1.5.0

func (_m *MockFileInfo) EXPECT() *_MockFileInfoRecorder

func (*MockFileInfo) IsDir ¶ added in v1.5.0

func (_m *MockFileInfo) IsDir() bool

func (*MockFileInfo) ModTime ¶ added in v1.5.0

func (_m *MockFileInfo) ModTime() time.Time

func (*MockFileInfo) Mode ¶ added in v1.5.0

func (_m *MockFileInfo) Mode() os.FileMode

func (*MockFileInfo) Name ¶ added in v1.5.0

func (_m *MockFileInfo) Name() string

func (*MockFileInfo) Size ¶ added in v1.5.0

func (_m *MockFileInfo) Size() int64

func (*MockFileInfo) Sys ¶ added in v1.5.0

func (_m *MockFileInfo) Sys() interface{}

type MockImageService ¶ added in v1.23.0

type MockImageService struct {
	// contains filtered or unexported fields
}

MockImageService is a mock of ImageService interface.

func NewMockImageService ¶ added in v1.23.0

func NewMockImageService(ctrl *gomock.Controller) *MockImageService

NewMockImageService creates a new mock instance.

func (*MockImageService) EXPECT ¶ added in v1.23.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockImageService) GetImageRef ¶ added in v1.23.0

func (m *MockImageService) GetImageRef(image container.ImageSpec) (string, error)

GetImageRef mocks base method.

func (*MockImageService) ImageStats ¶ added in v1.23.0

func (m *MockImageService) ImageStats() (*container.ImageStats, error)

ImageStats mocks base method.

func (*MockImageService) ListImages ¶ added in v1.23.0

func (m *MockImageService) ListImages() ([]container.Image, error)

ListImages mocks base method.

func (*MockImageService) PullImage ¶ added in v1.23.0

func (m *MockImageService) PullImage(image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error)

PullImage mocks base method.

func (*MockImageService) RemoveImage ¶ added in v1.23.0

func (m *MockImageService) RemoveImage(image container.ImageSpec) error

RemoveImage mocks base method.

type MockImageServiceMockRecorder ¶ added in v1.23.0

type MockImageServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockImageServiceMockRecorder is the mock recorder for MockImageService.

func (*MockImageServiceMockRecorder) GetImageRef ¶ added in v1.23.0

func (mr *MockImageServiceMockRecorder) GetImageRef(image interface{}) *gomock.Call

GetImageRef indicates an expected call of GetImageRef.

func (*MockImageServiceMockRecorder) ImageStats ¶ added in v1.23.0

func (mr *MockImageServiceMockRecorder) ImageStats() *gomock.Call

ImageStats indicates an expected call of ImageStats.

func (*MockImageServiceMockRecorder) ListImages ¶ added in v1.23.0

func (mr *MockImageServiceMockRecorder) ListImages() *gomock.Call

ListImages indicates an expected call of ListImages.

func (*MockImageServiceMockRecorder) PullImage ¶ added in v1.23.0

func (mr *MockImageServiceMockRecorder) PullImage(image, pullSecrets, podSandboxConfig interface{}) *gomock.Call

PullImage indicates an expected call of PullImage.

func (*MockImageServiceMockRecorder) RemoveImage ¶ added in v1.23.0

func (mr *MockImageServiceMockRecorder) RemoveImage(image interface{}) *gomock.Call

RemoveImage indicates an expected call of RemoveImage.

type MockRuntime ¶ added in v1.23.0

type MockRuntime struct {
	// contains filtered or unexported fields
}

MockRuntime is a mock of Runtime interface.

func NewMockRuntime ¶ added in v1.23.0

func NewMockRuntime(ctrl *gomock.Controller) *MockRuntime

NewMockRuntime creates a new mock instance.

func (*MockRuntime) APIVersion ¶ added in v1.23.0

func (m *MockRuntime) APIVersion() (container.Version, error)

APIVersion mocks base method.

func (*MockRuntime) CheckpointContainer ¶ added in v1.25.0

func (m *MockRuntime) CheckpointContainer(options *v10.CheckpointContainerRequest) error

CheckpointContainer mocks base method.

func (*MockRuntime) DeleteContainer ¶ added in v1.23.0

func (m *MockRuntime) DeleteContainer(containerID container.ContainerID) error

DeleteContainer mocks base method.

func (*MockRuntime) EXPECT ¶ added in v1.23.0

func (m *MockRuntime) EXPECT() *MockRuntimeMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRuntime) GarbageCollect ¶ added in v1.23.0

func (m *MockRuntime) GarbageCollect(gcPolicy container.GCPolicy, allSourcesReady, evictNonDeletedPods bool) error

GarbageCollect mocks base method.

func (*MockRuntime) GetContainerLogs ¶ added in v1.23.0

func (m *MockRuntime) GetContainerLogs(ctx context.Context, pod *v1.Pod, containerID container.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error

GetContainerLogs mocks base method.

func (*MockRuntime) GetImageRef ¶ added in v1.23.0

func (m *MockRuntime) GetImageRef(image container.ImageSpec) (string, error)

GetImageRef mocks base method.

func (*MockRuntime) GetPodStatus ¶ added in v1.23.0

func (m *MockRuntime) GetPodStatus(uid types.UID, name, namespace string) (*container.PodStatus, error)

GetPodStatus mocks base method.

func (*MockRuntime) GetPods ¶ added in v1.23.0

func (m *MockRuntime) GetPods(all bool) ([]*container.Pod, error)

GetPods mocks base method.

func (*MockRuntime) ImageStats ¶ added in v1.23.0

func (m *MockRuntime) ImageStats() (*container.ImageStats, error)

ImageStats mocks base method.

func (*MockRuntime) KillPod ¶ added in v1.23.0

func (m *MockRuntime) KillPod(pod *v1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error

KillPod mocks base method.

func (*MockRuntime) ListImages ¶ added in v1.23.0

func (m *MockRuntime) ListImages() ([]container.Image, error)

ListImages mocks base method.

func (*MockRuntime) PullImage ¶ added in v1.23.0

func (m *MockRuntime) PullImage(image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error)

PullImage mocks base method.

func (*MockRuntime) RemoveImage ¶ added in v1.23.0

func (m *MockRuntime) RemoveImage(image container.ImageSpec) error

RemoveImage mocks base method.

func (*MockRuntime) Status ¶ added in v1.23.0

func (m *MockRuntime) Status() (*container.RuntimeStatus, error)

Status mocks base method.

func (*MockRuntime) SyncPod ¶ added in v1.23.0

func (m *MockRuntime) SyncPod(pod *v1.Pod, podStatus *container.PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult

SyncPod mocks base method.

func (*MockRuntime) Type ¶ added in v1.23.0

func (m *MockRuntime) Type() string

Type mocks base method.

func (*MockRuntime) UpdatePodCIDR ¶ added in v1.23.0

func (m *MockRuntime) UpdatePodCIDR(podCIDR string) error

UpdatePodCIDR mocks base method.

func (*MockRuntime) Version ¶ added in v1.23.0

func (m *MockRuntime) Version() (container.Version, error)

Version mocks base method.

type MockRuntimeCache ¶ added in v1.8.0

type MockRuntimeCache struct {
	// contains filtered or unexported fields
}

MockRuntimeCache is a mock of RuntimeCache interface.

func NewMockRuntimeCache ¶ added in v1.23.0

func NewMockRuntimeCache(ctrl *gomock.Controller) *MockRuntimeCache

NewMockRuntimeCache creates a new mock instance.

func (*MockRuntimeCache) EXPECT ¶ added in v1.23.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRuntimeCache) ForceUpdateIfOlder ¶ added in v1.8.0

func (m *MockRuntimeCache) ForceUpdateIfOlder(arg0 time.Time) error

ForceUpdateIfOlder mocks base method.

func (*MockRuntimeCache) GetPods ¶ added in v1.8.0

func (m *MockRuntimeCache) GetPods() ([]*container.Pod, error)

GetPods mocks base method.

type MockRuntimeCacheMockRecorder ¶ added in v1.23.0

type MockRuntimeCacheMockRecorder struct {
	// contains filtered or unexported fields
}

MockRuntimeCacheMockRecorder is the mock recorder for MockRuntimeCache.

func (*MockRuntimeCacheMockRecorder) ForceUpdateIfOlder ¶ added in v1.23.0

func (mr *MockRuntimeCacheMockRecorder) ForceUpdateIfOlder(arg0 interface{}) *gomock.Call

ForceUpdateIfOlder indicates an expected call of ForceUpdateIfOlder.

func (*MockRuntimeCacheMockRecorder) GetPods ¶ added in v1.23.0

func (mr *MockRuntimeCacheMockRecorder) GetPods() *gomock.Call

GetPods indicates an expected call of GetPods.

type MockRuntimeMockRecorder ¶ added in v1.23.0

type MockRuntimeMockRecorder struct {
	// contains filtered or unexported fields
}

MockRuntimeMockRecorder is the mock recorder for MockRuntime.

func (*MockRuntimeMockRecorder) APIVersion ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) APIVersion() *gomock.Call

APIVersion indicates an expected call of APIVersion.

func (*MockRuntimeMockRecorder) CheckpointContainer ¶ added in v1.25.0

func (mr *MockRuntimeMockRecorder) CheckpointContainer(options interface{}) *gomock.Call

CheckpointContainer indicates an expected call of CheckpointContainer.

func (*MockRuntimeMockRecorder) DeleteContainer ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) DeleteContainer(containerID interface{}) *gomock.Call

DeleteContainer indicates an expected call of DeleteContainer.

func (*MockRuntimeMockRecorder) GarbageCollect ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) GarbageCollect(gcPolicy, allSourcesReady, evictNonDeletedPods interface{}) *gomock.Call

GarbageCollect indicates an expected call of GarbageCollect.

func (*MockRuntimeMockRecorder) GetContainerLogs ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) GetContainerLogs(ctx, pod, containerID, logOptions, stdout, stderr interface{}) *gomock.Call

GetContainerLogs indicates an expected call of GetContainerLogs.

func (*MockRuntimeMockRecorder) GetImageRef ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) GetImageRef(image interface{}) *gomock.Call

GetImageRef indicates an expected call of GetImageRef.

func (*MockRuntimeMockRecorder) GetPodStatus ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) GetPodStatus(uid, name, namespace interface{}) *gomock.Call

GetPodStatus indicates an expected call of GetPodStatus.

func (*MockRuntimeMockRecorder) GetPods ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) GetPods(all interface{}) *gomock.Call

GetPods indicates an expected call of GetPods.

func (*MockRuntimeMockRecorder) ImageStats ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) ImageStats() *gomock.Call

ImageStats indicates an expected call of ImageStats.

func (*MockRuntimeMockRecorder) KillPod ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) KillPod(pod, runningPod, gracePeriodOverride interface{}) *gomock.Call

KillPod indicates an expected call of KillPod.

func (*MockRuntimeMockRecorder) ListImages ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) ListImages() *gomock.Call

ListImages indicates an expected call of ListImages.

func (*MockRuntimeMockRecorder) PullImage ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) PullImage(image, pullSecrets, podSandboxConfig interface{}) *gomock.Call

PullImage indicates an expected call of PullImage.

func (*MockRuntimeMockRecorder) RemoveImage ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) RemoveImage(image interface{}) *gomock.Call

RemoveImage indicates an expected call of RemoveImage.

func (*MockRuntimeMockRecorder) Status ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) Status() *gomock.Call

Status indicates an expected call of Status.

func (*MockRuntimeMockRecorder) SyncPod ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) SyncPod(pod, podStatus, pullSecrets, backOff interface{}) *gomock.Call

SyncPod indicates an expected call of SyncPod.

func (*MockRuntimeMockRecorder) Type ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) Type() *gomock.Call

Type indicates an expected call of Type.

func (*MockRuntimeMockRecorder) UpdatePodCIDR ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) UpdatePodCIDR(podCIDR interface{}) *gomock.Call

UpdatePodCIDR indicates an expected call of UpdatePodCIDR.

func (*MockRuntimeMockRecorder) Version ¶ added in v1.23.0

func (mr *MockRuntimeMockRecorder) Version() *gomock.Call

Version indicates an expected call of Version.

type MockStreamingRuntime ¶ added in v1.23.0

type MockStreamingRuntime struct {
	// contains filtered or unexported fields
}

MockStreamingRuntime is a mock of StreamingRuntime interface.

func NewMockStreamingRuntime ¶ added in v1.23.0

func NewMockStreamingRuntime(ctrl *gomock.Controller) *MockStreamingRuntime

NewMockStreamingRuntime creates a new mock instance.

func (*MockStreamingRuntime) EXPECT ¶ added in v1.23.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStreamingRuntime) GetAttach ¶ added in v1.23.0

func (m *MockStreamingRuntime) GetAttach(id container.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error)

GetAttach mocks base method.

func (*MockStreamingRuntime) GetExec ¶ added in v1.23.0

func (m *MockStreamingRuntime) GetExec(id container.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error)

GetExec mocks base method.

func (*MockStreamingRuntime) GetPortForward ¶ added in v1.23.0

func (m *MockStreamingRuntime) GetPortForward(podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error)

GetPortForward mocks base method.

type MockStreamingRuntimeMockRecorder ¶ added in v1.23.0

type MockStreamingRuntimeMockRecorder struct {
	// contains filtered or unexported fields
}

MockStreamingRuntimeMockRecorder is the mock recorder for MockStreamingRuntime.

func (*MockStreamingRuntimeMockRecorder) GetAttach ¶ added in v1.23.0

func (mr *MockStreamingRuntimeMockRecorder) GetAttach(id, stdin, stdout, stderr, tty interface{}) *gomock.Call

GetAttach indicates an expected call of GetAttach.

func (*MockStreamingRuntimeMockRecorder) GetExec ¶ added in v1.23.0

func (mr *MockStreamingRuntimeMockRecorder) GetExec(id, cmd, stdin, stdout, stderr, tty interface{}) *gomock.Call

GetExec indicates an expected call of GetExec.

func (*MockStreamingRuntimeMockRecorder) GetPortForward ¶ added in v1.23.0

func (mr *MockStreamingRuntimeMockRecorder) GetPortForward(podName, podNamespace, podUID, ports interface{}) *gomock.Call

GetPortForward indicates an expected call of GetPortForward.

type MockVersion ¶ added in v1.23.0

type MockVersion struct {
	// contains filtered or unexported fields
}

MockVersion is a mock of Version interface.

func NewMockVersion ¶ added in v1.23.0

func NewMockVersion(ctrl *gomock.Controller) *MockVersion

NewMockVersion creates a new mock instance.

func (*MockVersion) Compare ¶ added in v1.23.0

func (m *MockVersion) Compare(other string) (int, error)

Compare mocks base method.

func (*MockVersion) EXPECT ¶ added in v1.23.0

func (m *MockVersion) EXPECT() *MockVersionMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockVersion) String ¶ added in v1.23.0

func (m *MockVersion) String() string

String mocks base method.

type MockVersionMockRecorder ¶ added in v1.23.0

type MockVersionMockRecorder struct {
	// contains filtered or unexported fields
}

MockVersionMockRecorder is the mock recorder for MockVersion.

func (*MockVersionMockRecorder) Compare ¶ added in v1.23.0

func (mr *MockVersionMockRecorder) Compare(other interface{}) *gomock.Call

Compare indicates an expected call of Compare.

func (*MockVersionMockRecorder) String ¶ added in v1.23.0

func (mr *MockVersionMockRecorder) String() *gomock.Call

String indicates an expected call of String.

type MockpodsGetter ¶ added in v1.23.0

type MockpodsGetter struct {
	// contains filtered or unexported fields
}

MockpodsGetter is a mock of podsGetter interface.

func NewMockpodsGetter ¶ added in v1.23.0

func NewMockpodsGetter(ctrl *gomock.Controller) *MockpodsGetter

NewMockpodsGetter creates a new mock instance.

func (*MockpodsGetter) EXPECT ¶ added in v1.23.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockpodsGetter) GetPods ¶ added in v1.23.0

func (m *MockpodsGetter) GetPods(arg0 bool) ([]*container.Pod, error)

GetPods mocks base method.

type MockpodsGetterMockRecorder ¶ added in v1.23.0

type MockpodsGetterMockRecorder struct {
	// contains filtered or unexported fields
}

MockpodsGetterMockRecorder is the mock recorder for MockpodsGetter.

func (*MockpodsGetterMockRecorder) GetPods ¶ added in v1.23.0

func (mr *MockpodsGetterMockRecorder) GetPods(arg0 interface{}) *gomock.Call

GetPods indicates an expected call of GetPods.

Jump to

Keyboard shortcuts

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