Documentation ¶
Overview ¶
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.
Index ¶
- Constants
- func NewFakeCache(runtime container.Runtime) container.Cache
- func NewFakeRuntimeCache(getter podsGetter) kubecontainer.RuntimeCache
- type FakeContainerCommandRunner
- type FakeOS
- func (FakeOS) Chmod(path string, perm os.FileMode) error
- func (FakeOS) Chtimes(path string, atime time.Time, mtime time.Time) error
- func (f *FakeOS) Create(path string) (*os.File, error)
- func (f *FakeOS) Glob(pattern string) ([]string, error)
- func (f *FakeOS) Hostname() (name string, err error)
- func (f *FakeOS) MkdirAll(path string, perm os.FileMode) error
- func (FakeOS) Open(name string) (*os.File, error)
- func (FakeOS) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (FakeOS) Pipe() (r *os.File, w *os.File, err error)
- func (f *FakeOS) ReadDir(dirname string) ([]os.DirEntry, error)
- func (f *FakeOS) Remove(path string) error
- func (f *FakeOS) RemoveAll(path string) error
- func (FakeOS) Rename(oldpath, newpath string) error
- func (f FakeOS) Stat(path string) (os.FileInfo, error)
- func (f *FakeOS) Symlink(oldname string, newname string) error
- type FakePod
- type FakeRuntime
- func (f *FakeRuntime) APIVersion() (kubecontainer.Version, error)
- func (f *FakeRuntime) AssertCalls(calls []string) bool
- func (f *FakeRuntime) AssertKilledContainers(containers []string) bool
- func (f *FakeRuntime) AssertKilledPods(pods []string) bool
- func (f *FakeRuntime) AssertStartedContainers(containers []string) bool
- func (f *FakeRuntime) AssertStartedPods(pods []string) bool
- func (f *FakeRuntime) CheckpointContainer(_ context.Context, options *runtimeapi.CheckpointContainerRequest) error
- func (f *FakeRuntime) ClearCalls()
- func (f *FakeRuntime) DeleteContainer(_ context.Context, containerID kubecontainer.ContainerID) error
- func (f *FakeRuntime) GarbageCollect(_ context.Context, gcPolicy kubecontainer.GCPolicy, ready bool, ...) error
- func (f *FakeRuntime) GeneratePodStatus(event *runtimeapi.ContainerEventResponse) (*kubecontainer.PodStatus, error)
- func (f *FakeRuntime) GetContainerLogs(_ context.Context, pod *v1.Pod, containerID kubecontainer.ContainerID, ...) (err error)
- func (f *FakeRuntime) GetImageRef(_ context.Context, image kubecontainer.ImageSpec) (string, error)
- func (f *FakeRuntime) GetPodStatus(_ context.Context, uid types.UID, name, namespace string) (*kubecontainer.PodStatus, error)
- func (f *FakeRuntime) GetPods(_ context.Context, all bool) ([]*kubecontainer.Pod, error)
- func (f *FakeRuntime) ImageStats(_ context.Context) (*kubecontainer.ImageStats, error)
- func (f *FakeRuntime) KillContainerInPod(container v1.Container, pod *v1.Pod) error
- func (f *FakeRuntime) KillPod(_ context.Context, pod *v1.Pod, runningPod kubecontainer.Pod, ...) error
- func (f *FakeRuntime) ListImages(_ context.Context) ([]kubecontainer.Image, error)
- func (f *FakeRuntime) ListMetricDescriptors(_ context.Context) ([]*runtimeapi.MetricDescriptor, error)
- func (f *FakeRuntime) ListPodSandboxMetrics(_ context.Context) ([]*runtimeapi.PodSandboxMetrics, error)
- func (f *FakeRuntime) PullImage(_ context.Context, image kubecontainer.ImageSpec, pullSecrets []v1.Secret, ...) (string, error)
- func (f *FakeRuntime) RemoveImage(_ context.Context, image kubecontainer.ImageSpec) error
- func (f *FakeRuntime) RunContainerInPod(container v1.Container, pod *v1.Pod, volumeMap map[string]volume.VolumePlugin) error
- func (f *FakeRuntime) Status(_ context.Context) (*kubecontainer.RuntimeStatus, error)
- func (f *FakeRuntime) SyncPod(_ context.Context, pod *v1.Pod, _ *kubecontainer.PodStatus, _ []v1.Secret, ...) (result kubecontainer.PodSyncResult)
- func (f *FakeRuntime) Type() string
- func (f *FakeRuntime) UpdatePodCIDR(_ context.Context, c string) error
- func (f *FakeRuntime) Version(_ context.Context) (kubecontainer.Version, error)
- type FakeRuntimeCache
- type FakeRuntimeHelper
- func (f *FakeRuntimeHelper) GeneratePodHostNameAndDomain(pod *v1.Pod) (string, string, error)
- func (f *FakeRuntimeHelper) GenerateRunContainerOptions(_ context.Context, pod *v1.Pod, container *v1.Container, podIP string, ...) (*kubecontainer.RunContainerOptions, func(), error)
- func (f *FakeRuntimeHelper) GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64
- func (f *FakeRuntimeHelper) GetOrCreateUserNamespaceMappings(pod *v1.Pod) (*runtimeapi.UserNamespace, error)
- func (f *FakeRuntimeHelper) GetPodCgroupParent(pod *v1.Pod) string
- func (f *FakeRuntimeHelper) GetPodDNS(pod *v1.Pod) (*runtimeapi.DNSConfig, error)
- func (f *FakeRuntimeHelper) GetPodDir(podUID kubetypes.UID) string
- type FakeStreamingRuntime
- func (f *FakeStreamingRuntime) GetAttach(_ context.Context, id kubecontainer.ContainerID, ...) (*url.URL, error)
- func (f *FakeStreamingRuntime) GetExec(_ context.Context, id kubecontainer.ContainerID, cmd []string, ...) (*url.URL, error)
- func (f *FakeStreamingRuntime) GetPortForward(_ context.Context, podName, podNamespace string, podUID types.UID, ...) (*url.URL, error)
- type FakeVersion
- type MockAttacher
- type MockAttacherMockRecorder
- type MockCommandRunner
- type MockCommandRunnerMockRecorder
- type MockDirEntry
- type MockDirEntryMockRecorder
- type MockImageService
- func (m *MockImageService) EXPECT() *MockImageServiceMockRecorder
- func (m *MockImageService) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error)
- func (m *MockImageService) ImageStats(ctx context.Context) (*container.ImageStats, error)
- func (m *MockImageService) ListImages(ctx context.Context) ([]container.Image, error)
- func (m *MockImageService) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, ...) (string, error)
- func (m *MockImageService) RemoveImage(ctx context.Context, image container.ImageSpec) error
- type MockImageServiceMockRecorder
- func (mr *MockImageServiceMockRecorder) GetImageRef(ctx, image interface{}) *gomock.Call
- func (mr *MockImageServiceMockRecorder) ImageStats(ctx interface{}) *gomock.Call
- func (mr *MockImageServiceMockRecorder) ListImages(ctx interface{}) *gomock.Call
- func (mr *MockImageServiceMockRecorder) PullImage(ctx, image, pullSecrets, podSandboxConfig interface{}) *gomock.Call
- func (mr *MockImageServiceMockRecorder) RemoveImage(ctx, image interface{}) *gomock.Call
- type MockRuntime
- func (m *MockRuntime) APIVersion() (container.Version, error)
- func (m *MockRuntime) CheckpointContainer(ctx context.Context, options *v10.CheckpointContainerRequest) error
- func (m *MockRuntime) DeleteContainer(ctx context.Context, containerID container.ContainerID) error
- func (m *MockRuntime) EXPECT() *MockRuntimeMockRecorder
- func (m *MockRuntime) GarbageCollect(ctx context.Context, gcPolicy container.GCPolicy, ...) error
- func (m *MockRuntime) GeneratePodStatus(event *v10.ContainerEventResponse) (*container.PodStatus, error)
- func (m *MockRuntime) GetContainerLogs(ctx context.Context, pod *v1.Pod, containerID container.ContainerID, ...) error
- func (m *MockRuntime) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error)
- func (m *MockRuntime) GetPodStatus(ctx context.Context, uid types.UID, name, namespace string) (*container.PodStatus, error)
- func (m *MockRuntime) GetPods(ctx context.Context, all bool) ([]*container.Pod, error)
- func (m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error)
- func (m *MockRuntime) KillPod(ctx context.Context, pod *v1.Pod, runningPod container.Pod, ...) error
- func (m *MockRuntime) ListImages(ctx context.Context) ([]container.Image, error)
- func (m *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v10.MetricDescriptor, error)
- func (m *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v10.PodSandboxMetrics, error)
- func (m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, ...) (string, error)
- func (m *MockRuntime) RemoveImage(ctx context.Context, image container.ImageSpec) error
- func (m *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error)
- func (m *MockRuntime) SyncPod(ctx context.Context, pod *v1.Pod, podStatus *container.PodStatus, ...) container.PodSyncResult
- func (m *MockRuntime) Type() string
- func (m *MockRuntime) UpdatePodCIDR(ctx context.Context, podCIDR string) error
- func (m *MockRuntime) Version(ctx context.Context) (container.Version, error)
- type MockRuntimeCache
- type MockRuntimeCacheMockRecorder
- type MockRuntimeMockRecorder
- func (mr *MockRuntimeMockRecorder) APIVersion() *gomock.Call
- func (mr *MockRuntimeMockRecorder) CheckpointContainer(ctx, options interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) DeleteContainer(ctx, containerID interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) GarbageCollect(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) GeneratePodStatus(event interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) GetContainerLogs(ctx, pod, containerID, logOptions, stdout, stderr interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) GetImageRef(ctx, image interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) GetPodStatus(ctx, uid, name, namespace interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) GetPods(ctx, all interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) ImageStats(ctx interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) KillPod(ctx, pod, runningPod, gracePeriodOverride interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) ListImages(ctx interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) ListMetricDescriptors(ctx interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) ListPodSandboxMetrics(ctx interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) PullImage(ctx, image, pullSecrets, podSandboxConfig interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) RemoveImage(ctx, image interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) Status(ctx interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) SyncPod(ctx, pod, podStatus, pullSecrets, backOff interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) Type() *gomock.Call
- func (mr *MockRuntimeMockRecorder) UpdatePodCIDR(ctx, podCIDR interface{}) *gomock.Call
- func (mr *MockRuntimeMockRecorder) Version(ctx interface{}) *gomock.Call
- type MockStreamingRuntime
- func (m *MockStreamingRuntime) EXPECT() *MockStreamingRuntimeMockRecorder
- func (m *MockStreamingRuntime) GetAttach(ctx context.Context, id container.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error)
- func (m *MockStreamingRuntime) GetExec(ctx context.Context, id container.ContainerID, cmd []string, ...) (*url.URL, error)
- func (m *MockStreamingRuntime) GetPortForward(ctx context.Context, podName, podNamespace string, podUID types.UID, ...) (*url.URL, error)
- type MockStreamingRuntimeMockRecorder
- func (mr *MockStreamingRuntimeMockRecorder) GetAttach(ctx, id, stdin, stdout, stderr, tty interface{}) *gomock.Call
- func (mr *MockStreamingRuntimeMockRecorder) GetExec(ctx, id, cmd, stdin, stdout, stderr, tty interface{}) *gomock.Call
- func (mr *MockStreamingRuntimeMockRecorder) GetPortForward(ctx, podName, podNamespace, podUID, ports interface{}) *gomock.Call
- type MockVersion
- type MockVersionMockRecorder
- type MockpodsGetter
- type MockpodsGetterMockRecorder
Constants ¶
const FakeHost = "localhost:12345"
Variables ¶
This section is empty.
Functions ¶
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(_ context.Context, 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.DirEntry, 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 (*FakeOS) Create ¶ added in v1.3.0
Create is a fake call that creates a virtual file and returns nil.
func (*FakeOS) Glob ¶ added in v1.5.0
Glob is a fake call that returns list of virtual files matching a pattern.
func (*FakeOS) ReadDir ¶ added in v1.3.0
ReadDir is a fake call that returns the files under the directory.
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(_ context.Context, 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(_ context.Context, containerID kubecontainer.ContainerID) error
func (*FakeRuntime) GarbageCollect ¶
func (f *FakeRuntime) GarbageCollect(_ context.Context, gcPolicy kubecontainer.GCPolicy, ready bool, evictNonDeletedPods bool) error
func (*FakeRuntime) GeneratePodStatus ¶ added in v1.26.0
func (f *FakeRuntime) GeneratePodStatus(event *runtimeapi.ContainerEventResponse) (*kubecontainer.PodStatus, 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(_ context.Context, image kubecontainer.ImageSpec) (string, error)
func (*FakeRuntime) GetPodStatus ¶
func (f *FakeRuntime) GetPodStatus(_ context.Context, uid types.UID, name, namespace string) (*kubecontainer.PodStatus, error)
func (*FakeRuntime) GetPods ¶
func (f *FakeRuntime) GetPods(_ context.Context, all bool) ([]*kubecontainer.Pod, error)
func (*FakeRuntime) ImageStats ¶ added in v1.3.0
func (f *FakeRuntime) ImageStats(_ context.Context) (*kubecontainer.ImageStats, error)
func (*FakeRuntime) KillContainerInPod ¶
func (*FakeRuntime) KillPod ¶
func (f *FakeRuntime) KillPod(_ context.Context, pod *v1.Pod, runningPod kubecontainer.Pod, gracePeriodOverride *int64) error
func (*FakeRuntime) ListImages ¶
func (f *FakeRuntime) ListImages(_ context.Context) ([]kubecontainer.Image, error)
func (*FakeRuntime) ListMetricDescriptors ¶ added in v1.26.0
func (f *FakeRuntime) ListMetricDescriptors(_ context.Context) ([]*runtimeapi.MetricDescriptor, error)
func (*FakeRuntime) ListPodSandboxMetrics ¶ added in v1.26.0
func (f *FakeRuntime) ListPodSandboxMetrics(_ context.Context) ([]*runtimeapi.PodSandboxMetrics, error)
func (*FakeRuntime) PullImage ¶
func (f *FakeRuntime) PullImage(_ context.Context, image kubecontainer.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, error)
func (*FakeRuntime) RemoveImage ¶
func (f *FakeRuntime) RemoveImage(_ context.Context, 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(_ context.Context) (*kubecontainer.RuntimeStatus, error)
func (*FakeRuntime) SyncPod ¶
func (f *FakeRuntime) SyncPod(_ context.Context, 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(_ context.Context, c string) error
UpdatePodCIDR fulfills the cri interface.
func (*FakeRuntime) Version ¶
func (f *FakeRuntime) Version(_ context.Context) (kubecontainer.Version, error)
type FakeRuntimeCache ¶
type FakeRuntimeCache struct {
// contains filtered or unexported fields
}
func (*FakeRuntimeCache) ForceUpdateIfOlder ¶
func (*FakeRuntimeCache) GetPods ¶
func (f *FakeRuntimeCache) GetPods(ctx context.Context) ([]*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
This is not used by docker runtime.
func (*FakeRuntimeHelper) GenerateRunContainerOptions ¶ added in v1.6.0
func (f *FakeRuntimeHelper) GenerateRunContainerOptions(_ context.Context, 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)
type FakeStreamingRuntime ¶ added in v1.11.0
type FakeStreamingRuntime struct {
*FakeRuntime
}
func (*FakeStreamingRuntime) GetAttach ¶ added in v1.11.0
func (f *FakeStreamingRuntime) GetAttach(_ context.Context, id kubecontainer.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error)
func (*FakeStreamingRuntime) GetExec ¶ added in v1.11.0
func (f *FakeStreamingRuntime) GetExec(_ context.Context, id kubecontainer.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error)
type FakeVersion ¶
type FakeVersion struct {
Version string
}
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(ctx context.Context, 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
func (m *MockAttacher) EXPECT() *MockAttacherMockRecorder
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(ctx, 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
func (m *MockCommandRunner) EXPECT() *MockCommandRunnerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCommandRunner) RunInContainer ¶ added in v1.23.0
func (m *MockCommandRunner) RunInContainer(ctx context.Context, 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(ctx, id, cmd, timeout interface{}) *gomock.Call
RunInContainer indicates an expected call of RunInContainer.
type MockDirEntry ¶ added in v1.26.0
type MockDirEntry struct {
// contains filtered or unexported fields
}
MockDirEntry is a mock of DirEntry interface.
func NewMockDirEntry ¶ added in v1.26.0
func NewMockDirEntry(ctrl *gomock.Controller) *MockDirEntry
NewMockDirEntry creates a new mock instance.
func (*MockDirEntry) EXPECT ¶ added in v1.26.0
func (m *MockDirEntry) EXPECT() *MockDirEntryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDirEntry) Info ¶ added in v1.26.0
func (m *MockDirEntry) Info() (fs.FileInfo, error)
Info mocks base method.
func (*MockDirEntry) IsDir ¶ added in v1.26.0
func (m *MockDirEntry) IsDir() bool
IsDir mocks base method.
func (*MockDirEntry) Name ¶ added in v1.26.0
func (m *MockDirEntry) Name() string
Name mocks base method.
func (*MockDirEntry) Type ¶ added in v1.26.0
func (m *MockDirEntry) Type() fs.FileMode
Type mocks base method.
type MockDirEntryMockRecorder ¶ added in v1.26.0
type MockDirEntryMockRecorder struct {
// contains filtered or unexported fields
}
MockDirEntryMockRecorder is the mock recorder for MockDirEntry.
func (*MockDirEntryMockRecorder) Info ¶ added in v1.26.0
func (mr *MockDirEntryMockRecorder) Info() *gomock.Call
Info indicates an expected call of Info.
func (*MockDirEntryMockRecorder) IsDir ¶ added in v1.26.0
func (mr *MockDirEntryMockRecorder) IsDir() *gomock.Call
IsDir indicates an expected call of IsDir.
func (*MockDirEntryMockRecorder) Name ¶ added in v1.26.0
func (mr *MockDirEntryMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name.
func (*MockDirEntryMockRecorder) Type ¶ added in v1.26.0
func (mr *MockDirEntryMockRecorder) Type() *gomock.Call
Type indicates an expected call of Type.
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
func (m *MockImageService) EXPECT() *MockImageServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockImageService) GetImageRef ¶ added in v1.23.0
func (m *MockImageService) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error)
GetImageRef mocks base method.
func (*MockImageService) ImageStats ¶ added in v1.23.0
func (m *MockImageService) ImageStats(ctx context.Context) (*container.ImageStats, error)
ImageStats mocks base method.
func (*MockImageService) ListImages ¶ added in v1.23.0
ListImages mocks base method.
func (*MockImageService) PullImage ¶ added in v1.23.0
func (m *MockImageService) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error)
PullImage mocks base method.
func (*MockImageService) RemoveImage ¶ added in v1.23.0
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(ctx, image interface{}) *gomock.Call
GetImageRef indicates an expected call of GetImageRef.
func (*MockImageServiceMockRecorder) ImageStats ¶ added in v1.23.0
func (mr *MockImageServiceMockRecorder) ImageStats(ctx interface{}) *gomock.Call
ImageStats indicates an expected call of ImageStats.
func (*MockImageServiceMockRecorder) ListImages ¶ added in v1.23.0
func (mr *MockImageServiceMockRecorder) ListImages(ctx interface{}) *gomock.Call
ListImages indicates an expected call of ListImages.
func (*MockImageServiceMockRecorder) PullImage ¶ added in v1.23.0
func (mr *MockImageServiceMockRecorder) PullImage(ctx, 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(ctx, 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(ctx context.Context, options *v10.CheckpointContainerRequest) error
CheckpointContainer mocks base method.
func (*MockRuntime) DeleteContainer ¶ added in v1.23.0
func (m *MockRuntime) DeleteContainer(ctx context.Context, 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(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady, evictNonDeletedPods bool) error
GarbageCollect mocks base method.
func (*MockRuntime) GeneratePodStatus ¶ added in v1.26.0
func (m *MockRuntime) GeneratePodStatus(event *v10.ContainerEventResponse) (*container.PodStatus, error)
GeneratePodStatus 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
GetImageRef mocks base method.
func (*MockRuntime) GetPodStatus ¶ added in v1.23.0
func (m *MockRuntime) GetPodStatus(ctx context.Context, uid types.UID, name, namespace string) (*container.PodStatus, error)
GetPodStatus mocks base method.
func (*MockRuntime) ImageStats ¶ added in v1.23.0
func (m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error)
ImageStats mocks base method.
func (*MockRuntime) KillPod ¶ added in v1.23.0
func (m *MockRuntime) KillPod(ctx context.Context, pod *v1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error
KillPod mocks base method.
func (*MockRuntime) ListImages ¶ added in v1.23.0
ListImages mocks base method.
func (*MockRuntime) ListMetricDescriptors ¶ added in v1.26.0
func (m *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v10.MetricDescriptor, error)
ListMetricDescriptors mocks base method.
func (*MockRuntime) ListPodSandboxMetrics ¶ added in v1.26.0
func (m *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v10.PodSandboxMetrics, error)
ListPodSandboxMetrics mocks base method.
func (*MockRuntime) PullImage ¶ added in v1.23.0
func (m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error)
PullImage mocks base method.
func (*MockRuntime) RemoveImage ¶ added in v1.23.0
RemoveImage mocks base method.
func (*MockRuntime) Status ¶ added in v1.23.0
func (m *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error)
Status mocks base method.
func (*MockRuntime) SyncPod ¶ added in v1.23.0
func (m *MockRuntime) SyncPod(ctx context.Context, 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(ctx context.Context, podCIDR string) error
UpdatePodCIDR 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
func (m *MockRuntimeCache) EXPECT() *MockRuntimeCacheMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRuntimeCache) ForceUpdateIfOlder ¶ added in v1.8.0
ForceUpdateIfOlder 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, arg1 interface{}) *gomock.Call
ForceUpdateIfOlder indicates an expected call of ForceUpdateIfOlder.
func (*MockRuntimeCacheMockRecorder) GetPods ¶ added in v1.23.0
func (mr *MockRuntimeCacheMockRecorder) GetPods(arg0 interface{}) *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(ctx, options interface{}) *gomock.Call
CheckpointContainer indicates an expected call of CheckpointContainer.
func (*MockRuntimeMockRecorder) DeleteContainer ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) DeleteContainer(ctx, containerID interface{}) *gomock.Call
DeleteContainer indicates an expected call of DeleteContainer.
func (*MockRuntimeMockRecorder) GarbageCollect ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) GarbageCollect(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods interface{}) *gomock.Call
GarbageCollect indicates an expected call of GarbageCollect.
func (*MockRuntimeMockRecorder) GeneratePodStatus ¶ added in v1.26.0
func (mr *MockRuntimeMockRecorder) GeneratePodStatus(event interface{}) *gomock.Call
GeneratePodStatus indicates an expected call of GeneratePodStatus.
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(ctx, image interface{}) *gomock.Call
GetImageRef indicates an expected call of GetImageRef.
func (*MockRuntimeMockRecorder) GetPodStatus ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) GetPodStatus(ctx, 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(ctx, all interface{}) *gomock.Call
GetPods indicates an expected call of GetPods.
func (*MockRuntimeMockRecorder) ImageStats ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) ImageStats(ctx interface{}) *gomock.Call
ImageStats indicates an expected call of ImageStats.
func (*MockRuntimeMockRecorder) KillPod ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) KillPod(ctx, 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(ctx interface{}) *gomock.Call
ListImages indicates an expected call of ListImages.
func (*MockRuntimeMockRecorder) ListMetricDescriptors ¶ added in v1.26.0
func (mr *MockRuntimeMockRecorder) ListMetricDescriptors(ctx interface{}) *gomock.Call
ListMetricDescriptors indicates an expected call of ListMetricDescriptors.
func (*MockRuntimeMockRecorder) ListPodSandboxMetrics ¶ added in v1.26.0
func (mr *MockRuntimeMockRecorder) ListPodSandboxMetrics(ctx interface{}) *gomock.Call
ListPodSandboxMetrics indicates an expected call of ListPodSandboxMetrics.
func (*MockRuntimeMockRecorder) PullImage ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) PullImage(ctx, 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(ctx, image interface{}) *gomock.Call
RemoveImage indicates an expected call of RemoveImage.
func (*MockRuntimeMockRecorder) Status ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) Status(ctx interface{}) *gomock.Call
Status indicates an expected call of Status.
func (*MockRuntimeMockRecorder) SyncPod ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) SyncPod(ctx, 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(ctx, podCIDR interface{}) *gomock.Call
UpdatePodCIDR indicates an expected call of UpdatePodCIDR.
func (*MockRuntimeMockRecorder) Version ¶ added in v1.23.0
func (mr *MockRuntimeMockRecorder) Version(ctx interface{}) *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
func (m *MockStreamingRuntime) EXPECT() *MockStreamingRuntimeMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStreamingRuntime) GetAttach ¶ added in v1.23.0
func (m *MockStreamingRuntime) GetAttach(ctx context.Context, id container.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error)
GetAttach 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(ctx, 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(ctx, 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(ctx, 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
func (m *MockpodsGetter) EXPECT() *MockpodsGetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
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, arg1 interface{}) *gomock.Call
GetPods indicates an expected call of GetPods.