package testing
import "k8s.io/kubernetes/pkg/kubelet/container/testing"
Index ¶
- Constants
- func NewFakeCache(runtime container.Runtime) container.Cache
- func NewFakeReadyProvider() kubecontainer.SourcesReadyProvider
- 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 FakeReadyProvider
- type FakeRuntime
- func (f *FakeRuntime) APIVersion() (kubecontainer.Version, error)
- func (f *FakeRuntime) AssertCallCounts(funcName string, expectedCount int) bool
- 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) DeleteContainer(_ context.Context, containerID kubecontainer.ContainerID) error
- func (f *FakeRuntime) GarbageCollect(_ context.Context, gcPolicy kubecontainer.GCPolicy, ready bool, evictNonDeletedPods bool) error
- func (f *FakeRuntime) GeneratePodStatus(event *runtimeapi.ContainerEventResponse) (*kubecontainer.PodStatus, error)
- func (f *FakeRuntime) GetContainerLogs(_ context.Context, pod *v1.Pod, containerID kubecontainer.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) (err error)
- func (f *FakeRuntime) GetContainerStatus(_ context.Context, _ kubecontainer.ContainerID) (status *kubecontainer.Status, err error)
- func (f *FakeRuntime) GetContainerSwapBehavior(pod *v1.Pod, container *v1.Container) kubetypes.SwapBehavior
- func (f *FakeRuntime) GetImageRef(_ context.Context, image kubecontainer.ImageSpec) (string, error)
- func (f *FakeRuntime) GetImageSize(_ context.Context, image kubecontainer.ImageSpec) (uint64, 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) ImageFsInfo(_ context.Context) (*runtimeapi.ImageFsInfoResponse, 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, gracePeriodOverride *int64) 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(ctx context.Context, image kubecontainer.ImageSpec, creds []credentialprovider.TrackedAuthConfig, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, 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) SetContainerFsStats(val []*runtimeapi.FilesystemUsage)
- func (f *FakeRuntime) SetImageFsStats(val []*runtimeapi.FilesystemUsage)
- func (f *FakeRuntime) Status(_ context.Context) (*kubecontainer.RuntimeStatus, error)
- func (f *FakeRuntime) SyncPod(_ context.Context, pod *v1.Pod, _ *kubecontainer.PodStatus, _ []v1.Secret, backOff *flowcontrol.Backoff) (result kubecontainer.PodSyncResult)
- func (f *FakeRuntime) Type() string
- func (f *FakeRuntime) UnblockImagePulls(count int)
- func (f *FakeRuntime) UpdatePodCIDR(_ context.Context, c string) error
- func (f *FakeRuntime) Version(_ context.Context) (kubecontainer.Version, error)
- type FakeRuntimeCache
- func (f *FakeRuntimeCache) ForceUpdateIfOlder(context.Context, time.Time) error
- func (f *FakeRuntimeCache) GetPods(ctx context.Context) ([]*kubecontainer.Pod, error)
- 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, podIPs []string, imageVolumes kubecontainer.ImageVolumes) (*kubecontainer.RunContainerOptions, func(), error)
- func (f *FakeRuntimeHelper) GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64
- func (f *FakeRuntimeHelper) GetOrCreateUserNamespaceMappings(pod *v1.Pod, runtimeHandler string) (*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
- func (f *FakeRuntimeHelper) PrepareDynamicResources(ctx context.Context, pod *v1.Pod) error
- func (f *FakeRuntimeHelper) SetPodWatchCondition(_ kubetypes.UID, _ string, _ func(*kubecontainer.PodStatus) bool)
- func (f *FakeRuntimeHelper) UnprepareDynamicResources(ctx context.Context, pod *v1.Pod) error
- type FakeStreamingRuntime
- func (f *FakeStreamingRuntime) GetAttach(_ context.Context, id kubecontainer.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error)
- func (f *FakeStreamingRuntime) GetExec(_ context.Context, id kubecontainer.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error)
- func (f *FakeStreamingRuntime) GetPortForward(_ context.Context, podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error)
- type FakeVersion
- type MockDirEntry
- func NewMockDirEntry(t interface { mock.TestingT Cleanup(func()) }) *MockDirEntry
- func (_m *MockDirEntry) EXPECT() *MockDirEntry_Expecter
- func (_m *MockDirEntry) Info() (fs.FileInfo, error)
- func (_m *MockDirEntry) IsDir() bool
- func (_m *MockDirEntry) Name() string
- func (_m *MockDirEntry) Type() fs.FileMode
- type MockDirEntry_Expecter
- func (_e *MockDirEntry_Expecter) Info() *MockDirEntry_Info_Call
- func (_e *MockDirEntry_Expecter) IsDir() *MockDirEntry_IsDir_Call
- func (_e *MockDirEntry_Expecter) Name() *MockDirEntry_Name_Call
- func (_e *MockDirEntry_Expecter) Type() *MockDirEntry_Type_Call
- type MockDirEntry_Info_Call
- func (_c *MockDirEntry_Info_Call) Return(_a0 fs.FileInfo, _a1 error) *MockDirEntry_Info_Call
- func (_c *MockDirEntry_Info_Call) Run(run func()) *MockDirEntry_Info_Call
- func (_c *MockDirEntry_Info_Call) RunAndReturn(run func() (fs.FileInfo, error)) *MockDirEntry_Info_Call
- type MockDirEntry_IsDir_Call
- func (_c *MockDirEntry_IsDir_Call) Return(_a0 bool) *MockDirEntry_IsDir_Call
- func (_c *MockDirEntry_IsDir_Call) Run(run func()) *MockDirEntry_IsDir_Call
- func (_c *MockDirEntry_IsDir_Call) RunAndReturn(run func() bool) *MockDirEntry_IsDir_Call
- type MockDirEntry_Name_Call
- func (_c *MockDirEntry_Name_Call) Return(_a0 string) *MockDirEntry_Name_Call
- func (_c *MockDirEntry_Name_Call) Run(run func()) *MockDirEntry_Name_Call
- func (_c *MockDirEntry_Name_Call) RunAndReturn(run func() string) *MockDirEntry_Name_Call
- type MockDirEntry_Type_Call
- func (_c *MockDirEntry_Type_Call) Return(_a0 fs.FileMode) *MockDirEntry_Type_Call
- func (_c *MockDirEntry_Type_Call) Run(run func()) *MockDirEntry_Type_Call
- func (_c *MockDirEntry_Type_Call) RunAndReturn(run func() fs.FileMode) *MockDirEntry_Type_Call
- type MockRuntime
- func NewMockRuntime(t interface { mock.TestingT Cleanup(func()) }) *MockRuntime
- func (_m *MockRuntime) APIVersion() (container.Version, error)
- func (_m *MockRuntime) CheckpointContainer(ctx context.Context, options *v1.CheckpointContainerRequest) error
- func (_m *MockRuntime) DeleteContainer(ctx context.Context, containerID container.ContainerID) error
- func (_m *MockRuntime) EXPECT() *MockRuntime_Expecter
- func (_m *MockRuntime) GarbageCollect(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error
- func (_m *MockRuntime) GeneratePodStatus(event *v1.ContainerEventResponse) (*container.PodStatus, error)
- func (_m *MockRuntime) GetContainerLogs(ctx context.Context, pod *corev1.Pod, containerID container.ContainerID, logOptions *corev1.PodLogOptions, stdout io.Writer, stderr io.Writer) error
- func (_m *MockRuntime) GetContainerStatus(ctx context.Context, id container.ContainerID) (*container.Status, error)
- func (_m *MockRuntime) GetContainerSwapBehavior(pod *corev1.Pod, _a1 *corev1.Container) types.SwapBehavior
- func (_m *MockRuntime) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error)
- func (_m *MockRuntime) GetImageSize(ctx context.Context, image container.ImageSpec) (uint64, error)
- func (_m *MockRuntime) GetPodStatus(ctx context.Context, uid pkgtypes.UID, name string, namespace string) (*container.PodStatus, error)
- func (_m *MockRuntime) GetPods(ctx context.Context, all bool) ([]*container.Pod, error)
- func (_m *MockRuntime) ImageFsInfo(ctx context.Context) (*v1.ImageFsInfoResponse, error)
- func (_m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error)
- func (_m *MockRuntime) KillPod(ctx context.Context, pod *corev1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error
- func (_m *MockRuntime) ListImages(ctx context.Context) ([]container.Image, error)
- func (_m *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v1.MetricDescriptor, error)
- func (_m *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v1.PodSandboxMetrics, error)
- func (_m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, 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 *corev1.Pod, podStatus *container.PodStatus, pullSecrets []corev1.Secret, backOff *flowcontrol.Backoff) 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
- func NewMockRuntimeCache(t interface { mock.TestingT Cleanup(func()) }) *MockRuntimeCache
- func (_m *MockRuntimeCache) EXPECT() *MockRuntimeCache_Expecter
- func (_m *MockRuntimeCache) ForceUpdateIfOlder(_a0 context.Context, _a1 time.Time) error
- func (_m *MockRuntimeCache) GetPods(_a0 context.Context) ([]*container.Pod, error)
- type MockRuntimeCache_Expecter
- func (_e *MockRuntimeCache_Expecter) ForceUpdateIfOlder(_a0 interface{}, _a1 interface{}) *MockRuntimeCache_ForceUpdateIfOlder_Call
- func (_e *MockRuntimeCache_Expecter) GetPods(_a0 interface{}) *MockRuntimeCache_GetPods_Call
- type MockRuntimeCache_ForceUpdateIfOlder_Call
- func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) Return(_a0 error) *MockRuntimeCache_ForceUpdateIfOlder_Call
- func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) Run(run func(_a0 context.Context, _a1 time.Time)) *MockRuntimeCache_ForceUpdateIfOlder_Call
- func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) RunAndReturn(run func(context.Context, time.Time) error) *MockRuntimeCache_ForceUpdateIfOlder_Call
- type MockRuntimeCache_GetPods_Call
- func (_c *MockRuntimeCache_GetPods_Call) Return(_a0 []*container.Pod, _a1 error) *MockRuntimeCache_GetPods_Call
- func (_c *MockRuntimeCache_GetPods_Call) Run(run func(_a0 context.Context)) *MockRuntimeCache_GetPods_Call
- func (_c *MockRuntimeCache_GetPods_Call) RunAndReturn(run func(context.Context) ([]*container.Pod, error)) *MockRuntimeCache_GetPods_Call
- type MockRuntime_APIVersion_Call
- func (_c *MockRuntime_APIVersion_Call) Return(_a0 container.Version, _a1 error) *MockRuntime_APIVersion_Call
- func (_c *MockRuntime_APIVersion_Call) Run(run func()) *MockRuntime_APIVersion_Call
- func (_c *MockRuntime_APIVersion_Call) RunAndReturn(run func() (container.Version, error)) *MockRuntime_APIVersion_Call
- type MockRuntime_CheckpointContainer_Call
- func (_c *MockRuntime_CheckpointContainer_Call) Return(_a0 error) *MockRuntime_CheckpointContainer_Call
- func (_c *MockRuntime_CheckpointContainer_Call) Run(run func(ctx context.Context, options *v1.CheckpointContainerRequest)) *MockRuntime_CheckpointContainer_Call
- func (_c *MockRuntime_CheckpointContainer_Call) RunAndReturn(run func(context.Context, *v1.CheckpointContainerRequest) error) *MockRuntime_CheckpointContainer_Call
- type MockRuntime_DeleteContainer_Call
- func (_c *MockRuntime_DeleteContainer_Call) Return(_a0 error) *MockRuntime_DeleteContainer_Call
- func (_c *MockRuntime_DeleteContainer_Call) Run(run func(ctx context.Context, containerID container.ContainerID)) *MockRuntime_DeleteContainer_Call
- func (_c *MockRuntime_DeleteContainer_Call) RunAndReturn(run func(context.Context, container.ContainerID) error) *MockRuntime_DeleteContainer_Call
- type MockRuntime_Expecter
- func (_e *MockRuntime_Expecter) APIVersion() *MockRuntime_APIVersion_Call
- func (_e *MockRuntime_Expecter) CheckpointContainer(ctx interface{}, options interface{}) *MockRuntime_CheckpointContainer_Call
- func (_e *MockRuntime_Expecter) DeleteContainer(ctx interface{}, containerID interface{}) *MockRuntime_DeleteContainer_Call
- func (_e *MockRuntime_Expecter) GarbageCollect(ctx interface{}, gcPolicy interface{}, allSourcesReady interface{}, evictNonDeletedPods interface{}) *MockRuntime_GarbageCollect_Call
- func (_e *MockRuntime_Expecter) GeneratePodStatus(event interface{}) *MockRuntime_GeneratePodStatus_Call
- func (_e *MockRuntime_Expecter) GetContainerLogs(ctx interface{}, pod interface{}, containerID interface{}, logOptions interface{}, stdout interface{}, stderr interface{}) *MockRuntime_GetContainerLogs_Call
- func (_e *MockRuntime_Expecter) GetContainerStatus(ctx interface{}, id interface{}) *MockRuntime_GetContainerStatus_Call
- func (_e *MockRuntime_Expecter) GetContainerSwapBehavior(pod interface{}, _a1 interface{}) *MockRuntime_GetContainerSwapBehavior_Call
- func (_e *MockRuntime_Expecter) GetImageRef(ctx interface{}, image interface{}) *MockRuntime_GetImageRef_Call
- func (_e *MockRuntime_Expecter) GetImageSize(ctx interface{}, image interface{}) *MockRuntime_GetImageSize_Call
- func (_e *MockRuntime_Expecter) GetPodStatus(ctx interface{}, uid interface{}, name interface{}, namespace interface{}) *MockRuntime_GetPodStatus_Call
- func (_e *MockRuntime_Expecter) GetPods(ctx interface{}, all interface{}) *MockRuntime_GetPods_Call
- func (_e *MockRuntime_Expecter) ImageFsInfo(ctx interface{}) *MockRuntime_ImageFsInfo_Call
- func (_e *MockRuntime_Expecter) ImageStats(ctx interface{}) *MockRuntime_ImageStats_Call
- func (_e *MockRuntime_Expecter) KillPod(ctx interface{}, pod interface{}, runningPod interface{}, gracePeriodOverride interface{}) *MockRuntime_KillPod_Call
- func (_e *MockRuntime_Expecter) ListImages(ctx interface{}) *MockRuntime_ListImages_Call
- func (_e *MockRuntime_Expecter) ListMetricDescriptors(ctx interface{}) *MockRuntime_ListMetricDescriptors_Call
- func (_e *MockRuntime_Expecter) ListPodSandboxMetrics(ctx interface{}) *MockRuntime_ListPodSandboxMetrics_Call
- func (_e *MockRuntime_Expecter) PullImage(ctx interface{}, image interface{}, credentials interface{}, podSandboxConfig interface{}) *MockRuntime_PullImage_Call
- func (_e *MockRuntime_Expecter) RemoveImage(ctx interface{}, image interface{}) *MockRuntime_RemoveImage_Call
- func (_e *MockRuntime_Expecter) Status(ctx interface{}) *MockRuntime_Status_Call
- func (_e *MockRuntime_Expecter) SyncPod(ctx interface{}, pod interface{}, podStatus interface{}, pullSecrets interface{}, backOff interface{}) *MockRuntime_SyncPod_Call
- func (_e *MockRuntime_Expecter) Type() *MockRuntime_Type_Call
- func (_e *MockRuntime_Expecter) UpdatePodCIDR(ctx interface{}, podCIDR interface{}) *MockRuntime_UpdatePodCIDR_Call
- func (_e *MockRuntime_Expecter) Version(ctx interface{}) *MockRuntime_Version_Call
- type MockRuntime_GarbageCollect_Call
- func (_c *MockRuntime_GarbageCollect_Call) Return(_a0 error) *MockRuntime_GarbageCollect_Call
- func (_c *MockRuntime_GarbageCollect_Call) Run(run func(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool)) *MockRuntime_GarbageCollect_Call
- func (_c *MockRuntime_GarbageCollect_Call) RunAndReturn(run func(context.Context, container.GCPolicy, bool, bool) error) *MockRuntime_GarbageCollect_Call
- type MockRuntime_GeneratePodStatus_Call
- func (_c *MockRuntime_GeneratePodStatus_Call) Return(_a0 *container.PodStatus, _a1 error) *MockRuntime_GeneratePodStatus_Call
- func (_c *MockRuntime_GeneratePodStatus_Call) Run(run func(event *v1.ContainerEventResponse)) *MockRuntime_GeneratePodStatus_Call
- func (_c *MockRuntime_GeneratePodStatus_Call) RunAndReturn(run func(*v1.ContainerEventResponse) (*container.PodStatus, error)) *MockRuntime_GeneratePodStatus_Call
- type MockRuntime_GetContainerLogs_Call
- func (_c *MockRuntime_GetContainerLogs_Call) Return(err error) *MockRuntime_GetContainerLogs_Call
- func (_c *MockRuntime_GetContainerLogs_Call) Run(run func(ctx context.Context, pod *corev1.Pod, containerID container.ContainerID, logOptions *corev1.PodLogOptions, stdout io.Writer, stderr io.Writer)) *MockRuntime_GetContainerLogs_Call
- func (_c *MockRuntime_GetContainerLogs_Call) RunAndReturn(run func(context.Context, *corev1.Pod, container.ContainerID, *corev1.PodLogOptions, io.Writer, io.Writer) error) *MockRuntime_GetContainerLogs_Call
- type MockRuntime_GetContainerStatus_Call
- func (_c *MockRuntime_GetContainerStatus_Call) Return(_a0 *container.Status, _a1 error) *MockRuntime_GetContainerStatus_Call
- func (_c *MockRuntime_GetContainerStatus_Call) Run(run func(ctx context.Context, id container.ContainerID)) *MockRuntime_GetContainerStatus_Call
- func (_c *MockRuntime_GetContainerStatus_Call) RunAndReturn(run func(context.Context, container.ContainerID) (*container.Status, error)) *MockRuntime_GetContainerStatus_Call
- type MockRuntime_GetContainerSwapBehavior_Call
- func (_c *MockRuntime_GetContainerSwapBehavior_Call) Return(_a0 types.SwapBehavior) *MockRuntime_GetContainerSwapBehavior_Call
- func (_c *MockRuntime_GetContainerSwapBehavior_Call) Run(run func(pod *corev1.Pod, _a1 *corev1.Container)) *MockRuntime_GetContainerSwapBehavior_Call
- func (_c *MockRuntime_GetContainerSwapBehavior_Call) RunAndReturn(run func(*corev1.Pod, *corev1.Container) types.SwapBehavior) *MockRuntime_GetContainerSwapBehavior_Call
- type MockRuntime_GetImageRef_Call
- func (_c *MockRuntime_GetImageRef_Call) Return(_a0 string, _a1 error) *MockRuntime_GetImageRef_Call
- func (_c *MockRuntime_GetImageRef_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageRef_Call
- func (_c *MockRuntime_GetImageRef_Call) RunAndReturn(run func(context.Context, container.ImageSpec) (string, error)) *MockRuntime_GetImageRef_Call
- type MockRuntime_GetImageSize_Call
- func (_c *MockRuntime_GetImageSize_Call) Return(_a0 uint64, _a1 error) *MockRuntime_GetImageSize_Call
- func (_c *MockRuntime_GetImageSize_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageSize_Call
- func (_c *MockRuntime_GetImageSize_Call) RunAndReturn(run func(context.Context, container.ImageSpec) (uint64, error)) *MockRuntime_GetImageSize_Call
- type MockRuntime_GetPodStatus_Call
- func (_c *MockRuntime_GetPodStatus_Call) Return(_a0 *container.PodStatus, _a1 error) *MockRuntime_GetPodStatus_Call
- func (_c *MockRuntime_GetPodStatus_Call) Run(run func(ctx context.Context, uid pkgtypes.UID, name string, namespace string)) *MockRuntime_GetPodStatus_Call
- func (_c *MockRuntime_GetPodStatus_Call) RunAndReturn(run func(context.Context, pkgtypes.UID, string, string) (*container.PodStatus, error)) *MockRuntime_GetPodStatus_Call
- type MockRuntime_GetPods_Call
- func (_c *MockRuntime_GetPods_Call) Return(_a0 []*container.Pod, _a1 error) *MockRuntime_GetPods_Call
- func (_c *MockRuntime_GetPods_Call) Run(run func(ctx context.Context, all bool)) *MockRuntime_GetPods_Call
- func (_c *MockRuntime_GetPods_Call) RunAndReturn(run func(context.Context, bool) ([]*container.Pod, error)) *MockRuntime_GetPods_Call
- type MockRuntime_ImageFsInfo_Call
- func (_c *MockRuntime_ImageFsInfo_Call) Return(_a0 *v1.ImageFsInfoResponse, _a1 error) *MockRuntime_ImageFsInfo_Call
- func (_c *MockRuntime_ImageFsInfo_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageFsInfo_Call
- func (_c *MockRuntime_ImageFsInfo_Call) RunAndReturn(run func(context.Context) (*v1.ImageFsInfoResponse, error)) *MockRuntime_ImageFsInfo_Call
- type MockRuntime_ImageStats_Call
- func (_c *MockRuntime_ImageStats_Call) Return(_a0 *container.ImageStats, _a1 error) *MockRuntime_ImageStats_Call
- func (_c *MockRuntime_ImageStats_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageStats_Call
- func (_c *MockRuntime_ImageStats_Call) RunAndReturn(run func(context.Context) (*container.ImageStats, error)) *MockRuntime_ImageStats_Call
- type MockRuntime_KillPod_Call
- func (_c *MockRuntime_KillPod_Call) Return(_a0 error) *MockRuntime_KillPod_Call
- func (_c *MockRuntime_KillPod_Call) Run(run func(ctx context.Context, pod *corev1.Pod, runningPod container.Pod, gracePeriodOverride *int64)) *MockRuntime_KillPod_Call
- func (_c *MockRuntime_KillPod_Call) RunAndReturn(run func(context.Context, *corev1.Pod, container.Pod, *int64) error) *MockRuntime_KillPod_Call
- type MockRuntime_ListImages_Call
- func (_c *MockRuntime_ListImages_Call) Return(_a0 []container.Image, _a1 error) *MockRuntime_ListImages_Call
- func (_c *MockRuntime_ListImages_Call) Run(run func(ctx context.Context)) *MockRuntime_ListImages_Call
- func (_c *MockRuntime_ListImages_Call) RunAndReturn(run func(context.Context) ([]container.Image, error)) *MockRuntime_ListImages_Call
- type MockRuntime_ListMetricDescriptors_Call
- func (_c *MockRuntime_ListMetricDescriptors_Call) Return(_a0 []*v1.MetricDescriptor, _a1 error) *MockRuntime_ListMetricDescriptors_Call
- func (_c *MockRuntime_ListMetricDescriptors_Call) Run(run func(ctx context.Context)) *MockRuntime_ListMetricDescriptors_Call
- func (_c *MockRuntime_ListMetricDescriptors_Call) RunAndReturn(run func(context.Context) ([]*v1.MetricDescriptor, error)) *MockRuntime_ListMetricDescriptors_Call
- type MockRuntime_ListPodSandboxMetrics_Call
- func (_c *MockRuntime_ListPodSandboxMetrics_Call) Return(_a0 []*v1.PodSandboxMetrics, _a1 error) *MockRuntime_ListPodSandboxMetrics_Call
- func (_c *MockRuntime_ListPodSandboxMetrics_Call) Run(run func(ctx context.Context)) *MockRuntime_ListPodSandboxMetrics_Call
- func (_c *MockRuntime_ListPodSandboxMetrics_Call) RunAndReturn(run func(context.Context) ([]*v1.PodSandboxMetrics, error)) *MockRuntime_ListPodSandboxMetrics_Call
- type MockRuntime_PullImage_Call
- func (_c *MockRuntime_PullImage_Call) Return(_a0 string, _a1 *credentialprovider.TrackedAuthConfig, _a2 error) *MockRuntime_PullImage_Call
- func (_c *MockRuntime_PullImage_Call) Run(run func(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig)) *MockRuntime_PullImage_Call
- func (_c *MockRuntime_PullImage_Call) RunAndReturn(run func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error)) *MockRuntime_PullImage_Call
- type MockRuntime_RemoveImage_Call
- func (_c *MockRuntime_RemoveImage_Call) Return(_a0 error) *MockRuntime_RemoveImage_Call
- func (_c *MockRuntime_RemoveImage_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_RemoveImage_Call
- func (_c *MockRuntime_RemoveImage_Call) RunAndReturn(run func(context.Context, container.ImageSpec) error) *MockRuntime_RemoveImage_Call
- type MockRuntime_Status_Call
- func (_c *MockRuntime_Status_Call) Return(_a0 *container.RuntimeStatus, _a1 error) *MockRuntime_Status_Call
- func (_c *MockRuntime_Status_Call) Run(run func(ctx context.Context)) *MockRuntime_Status_Call
- func (_c *MockRuntime_Status_Call) RunAndReturn(run func(context.Context) (*container.RuntimeStatus, error)) *MockRuntime_Status_Call
- type MockRuntime_SyncPod_Call
- func (_c *MockRuntime_SyncPod_Call) Return(_a0 container.PodSyncResult) *MockRuntime_SyncPod_Call
- func (_c *MockRuntime_SyncPod_Call) Run(run func(ctx context.Context, pod *corev1.Pod, podStatus *container.PodStatus, pullSecrets []corev1.Secret, backOff *flowcontrol.Backoff)) *MockRuntime_SyncPod_Call
- func (_c *MockRuntime_SyncPod_Call) RunAndReturn(run func(context.Context, *corev1.Pod, *container.PodStatus, []corev1.Secret, *flowcontrol.Backoff) container.PodSyncResult) *MockRuntime_SyncPod_Call
- type MockRuntime_Type_Call
- func (_c *MockRuntime_Type_Call) Return(_a0 string) *MockRuntime_Type_Call
- func (_c *MockRuntime_Type_Call) Run(run func()) *MockRuntime_Type_Call
- func (_c *MockRuntime_Type_Call) RunAndReturn(run func() string) *MockRuntime_Type_Call
- type MockRuntime_UpdatePodCIDR_Call
- func (_c *MockRuntime_UpdatePodCIDR_Call) Return(_a0 error) *MockRuntime_UpdatePodCIDR_Call
- func (_c *MockRuntime_UpdatePodCIDR_Call) Run(run func(ctx context.Context, podCIDR string)) *MockRuntime_UpdatePodCIDR_Call
- func (_c *MockRuntime_UpdatePodCIDR_Call) RunAndReturn(run func(context.Context, string) error) *MockRuntime_UpdatePodCIDR_Call
- type MockRuntime_Version_Call
- func (_c *MockRuntime_Version_Call) Return(_a0 container.Version, _a1 error) *MockRuntime_Version_Call
- func (_c *MockRuntime_Version_Call) Run(run func(ctx context.Context)) *MockRuntime_Version_Call
- func (_c *MockRuntime_Version_Call) RunAndReturn(run func(context.Context) (container.Version, error)) *MockRuntime_Version_Call
- type TB
Constants ¶
const FakeHost = "localhost:12345"
Functions ¶
func NewFakeCache ¶
func NewFakeReadyProvider ¶
func NewFakeReadyProvider() kubecontainer.SourcesReadyProvider
NewFakeReadyProvider creates a FakeReadyProvider object
func NewFakeRuntimeCache ¶
func NewFakeRuntimeCache(getter podsGetter) kubecontainer.RuntimeCache
Types ¶
type FakeContainerCommandRunner ¶
type FakeContainerCommandRunner struct { // what to return Stdout string Err error // actual values when invoked ContainerID kubecontainer.ContainerID Cmd []string }
func (*FakeContainerCommandRunner) RunInContainer ¶
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 FilesLock sync.RWMutex }
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) Chmod ¶
Chmod is a fake call that returns nil.
func (*FakeOS) Chtimes ¶
Chtimes is a fake call that returns nil.
func (*FakeOS) Create ¶
Create is a fake call that creates a virtual file and returns nil.
func (*FakeOS) Glob ¶
Glob is a fake call that returns list of virtual files matching a pattern.
func (*FakeOS) Hostname ¶
Hostname is a fake call that returns nil.
func (*FakeOS) MkdirAll ¶
Mkdir is a fake call that just returns nil.
func (*FakeOS) Open ¶
Open is a fake call that returns nil.
func (*FakeOS) OpenFile ¶
OpenFile is a fake call that return nil.
func (*FakeOS) Pipe ¶
Pipe is a fake call that returns nil.
func (*FakeOS) ReadDir ¶
ReadDir is a fake call that returns the files under the directory.
func (*FakeOS) Remove ¶
Remove is a fake call that returns nil.
func (*FakeOS) RemoveAll ¶
RemoveAll is a fake call that just returns nil.
func (*FakeOS) Rename ¶
Rename is a fake call that return nil.
func (*FakeOS) Stat ¶
Stat is a fake that returns an error
func (*FakeOS) Symlink ¶
Symlink is a fake call that just returns nil.
type FakePod ¶
type FakePod struct { Pod *kubecontainer.Pod NetnsPath string }
type FakeReadyProvider ¶
type FakeReadyProvider struct { kubecontainer.SourcesReadyProvider }
FakeReadyProvider implements a fake ready provider
func (*FakeReadyProvider) AllReady ¶
func (frp *FakeReadyProvider) AllReady() bool
AllReady notifies caller that the Fake Provider is ready.
type FakeRuntime ¶
type FakeRuntime struct { sync.Mutex CalledFunctions []string PodList []*FakePod AllPodList []*FakePod ImageList []kubecontainer.Image ImageFsStats []*runtimeapi.FilesystemUsage ContainerFsStats []*runtimeapi.FilesystemUsage APIPodStatus v1.PodStatus PodStatus kubecontainer.PodStatus StartedPods []string KilledPods []string StartedContainers []string KilledContainers []string RuntimeStatus *kubecontainer.RuntimeStatus VersionInfo string APIVersionInfo string RuntimeType string SyncResults *kubecontainer.PodSyncResult Err error InspectErr error StatusErr error // If BlockImagePulls is true, then all PullImage() calls will be blocked until // UnblockImagePulls() is called. This is used to simulate image pull latency // from container runtime. BlockImagePulls bool SwapBehavior map[string]kubetypes.SwapBehavior T TB // contains filtered or unexported fields }
FakeRuntime is a fake container runtime for testing.
func (*FakeRuntime) APIVersion ¶
func (f *FakeRuntime) APIVersion() (kubecontainer.Version, error)
func (*FakeRuntime) AssertCallCounts ¶
func (f *FakeRuntime) AssertCallCounts(funcName string, expectedCount int) bool
AssertCallCounts checks if a certain call is called for a certain of numbers
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 ¶
func (f *FakeRuntime) CheckpointContainer(_ context.Context, options *runtimeapi.CheckpointContainerRequest) error
func (*FakeRuntime) DeleteContainer ¶
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 ¶
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) GetContainerStatus ¶
func (f *FakeRuntime) GetContainerStatus(_ context.Context, _ kubecontainer.ContainerID) (status *kubecontainer.Status, err error)
func (*FakeRuntime) GetContainerSwapBehavior ¶
func (f *FakeRuntime) GetContainerSwapBehavior(pod *v1.Pod, container *v1.Container) kubetypes.SwapBehavior
func (*FakeRuntime) GetImageRef ¶
func (f *FakeRuntime) GetImageRef(_ context.Context, image kubecontainer.ImageSpec) (string, error)
func (*FakeRuntime) GetImageSize ¶
func (f *FakeRuntime) GetImageSize(_ context.Context, image kubecontainer.ImageSpec) (uint64, 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) ImageFsInfo ¶
func (f *FakeRuntime) ImageFsInfo(_ context.Context) (*runtimeapi.ImageFsInfoResponse, error)
ImageFsInfo returns a ImageFsInfoResponse given the DI injected values of ImageFsStats and ContainerFsStats.
func (*FakeRuntime) ImageStats ¶
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 ¶
func (f *FakeRuntime) ListMetricDescriptors(_ context.Context) ([]*runtimeapi.MetricDescriptor, error)
func (*FakeRuntime) ListPodSandboxMetrics ¶
func (f *FakeRuntime) ListPodSandboxMetrics(_ context.Context) ([]*runtimeapi.PodSandboxMetrics, error)
func (*FakeRuntime) PullImage ¶
func (f *FakeRuntime) PullImage(ctx context.Context, image kubecontainer.ImageSpec, creds []credentialprovider.TrackedAuthConfig, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, 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) SetContainerFsStats ¶
func (f *FakeRuntime) SetContainerFsStats(val []*runtimeapi.FilesystemUsage)
SetContainerFsStats sets the containerFsStats for dependency injection.
func (*FakeRuntime) SetImageFsStats ¶
func (f *FakeRuntime) SetImageFsStats(val []*runtimeapi.FilesystemUsage)
SetImageFsStats sets the ImageFsStats for dependency injection.
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) UnblockImagePulls ¶
func (f *FakeRuntime) UnblockImagePulls(count int)
UnblockImagePulls unblocks a certain number of image pulls, if BlockImagePulls is true.
func (*FakeRuntime) UpdatePodCIDR ¶
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 ¶
type FakeRuntimeHelper struct { DNSServers []string DNSSearches []string DNSOptions []string HostName string HostDomain string PodContainerDir string RuntimeHandlers map[string]kubecontainer.RuntimeHandler Err error }
FakeRuntimeHelper implements RuntimeHelper interfaces for testing purposes.
func (*FakeRuntimeHelper) GeneratePodHostNameAndDomain ¶
This is not used by docker runtime.
func (*FakeRuntimeHelper) GenerateRunContainerOptions ¶
func (f *FakeRuntimeHelper) GenerateRunContainerOptions(_ context.Context, pod *v1.Pod, container *v1.Container, podIP string, podIPs []string, imageVolumes kubecontainer.ImageVolumes) (*kubecontainer.RunContainerOptions, func(), error)
func (*FakeRuntimeHelper) GetExtraSupplementalGroupsForPod ¶
func (f *FakeRuntimeHelper) GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64
func (*FakeRuntimeHelper) GetOrCreateUserNamespaceMappings ¶
func (f *FakeRuntimeHelper) GetOrCreateUserNamespaceMappings(pod *v1.Pod, runtimeHandler string) (*runtimeapi.UserNamespace, error)
func (*FakeRuntimeHelper) GetPodCgroupParent ¶
func (f *FakeRuntimeHelper) GetPodCgroupParent(pod *v1.Pod) string
func (*FakeRuntimeHelper) GetPodDNS ¶
func (f *FakeRuntimeHelper) GetPodDNS(pod *v1.Pod) (*runtimeapi.DNSConfig, error)
func (*FakeRuntimeHelper) GetPodDir ¶
func (f *FakeRuntimeHelper) GetPodDir(podUID kubetypes.UID) string
func (*FakeRuntimeHelper) PrepareDynamicResources ¶
func (*FakeRuntimeHelper) SetPodWatchCondition ¶
func (f *FakeRuntimeHelper) SetPodWatchCondition(_ kubetypes.UID, _ string, _ func(*kubecontainer.PodStatus) bool)
func (*FakeRuntimeHelper) UnprepareDynamicResources ¶
type FakeStreamingRuntime ¶
type FakeStreamingRuntime struct { *FakeRuntime }
func (*FakeStreamingRuntime) GetAttach ¶
func (f *FakeStreamingRuntime) GetAttach(_ context.Context, id kubecontainer.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error)
func (*FakeStreamingRuntime) GetExec ¶
func (f *FakeStreamingRuntime) GetExec(_ context.Context, id kubecontainer.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error)
func (*FakeStreamingRuntime) GetPortForward ¶
func (f *FakeStreamingRuntime) GetPortForward(_ context.Context, 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 MockDirEntry ¶
MockDirEntry is an autogenerated mock type for the DirEntry type
func NewMockDirEntry ¶
func NewMockDirEntry(t interface { mock.TestingT Cleanup(func()) }) *MockDirEntry
NewMockDirEntry creates a new instance of MockDirEntry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockDirEntry) EXPECT ¶
func (_m *MockDirEntry) EXPECT() *MockDirEntry_Expecter
func (*MockDirEntry) Info ¶
func (_m *MockDirEntry) Info() (fs.FileInfo, error)
Info provides a mock function with given fields:
func (*MockDirEntry) IsDir ¶
func (_m *MockDirEntry) IsDir() bool
IsDir provides a mock function with given fields:
func (*MockDirEntry) Name ¶
func (_m *MockDirEntry) Name() string
Name provides a mock function with given fields:
func (*MockDirEntry) Type ¶
func (_m *MockDirEntry) Type() fs.FileMode
Type provides a mock function with given fields:
type MockDirEntry_Expecter ¶
type MockDirEntry_Expecter struct {
// contains filtered or unexported fields
}
func (*MockDirEntry_Expecter) Info ¶
func (_e *MockDirEntry_Expecter) Info() *MockDirEntry_Info_Call
Info is a helper method to define mock.On call
func (*MockDirEntry_Expecter) IsDir ¶
func (_e *MockDirEntry_Expecter) IsDir() *MockDirEntry_IsDir_Call
IsDir is a helper method to define mock.On call
func (*MockDirEntry_Expecter) Name ¶
func (_e *MockDirEntry_Expecter) Name() *MockDirEntry_Name_Call
Name is a helper method to define mock.On call
func (*MockDirEntry_Expecter) Type ¶
func (_e *MockDirEntry_Expecter) Type() *MockDirEntry_Type_Call
Type is a helper method to define mock.On call
type MockDirEntry_Info_Call ¶
MockDirEntry_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info'
func (*MockDirEntry_Info_Call) Return ¶
func (_c *MockDirEntry_Info_Call) Return(_a0 fs.FileInfo, _a1 error) *MockDirEntry_Info_Call
func (*MockDirEntry_Info_Call) Run ¶
func (_c *MockDirEntry_Info_Call) Run(run func()) *MockDirEntry_Info_Call
func (*MockDirEntry_Info_Call) RunAndReturn ¶
func (_c *MockDirEntry_Info_Call) RunAndReturn(run func() (fs.FileInfo, error)) *MockDirEntry_Info_Call
type MockDirEntry_IsDir_Call ¶
MockDirEntry_IsDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDir'
func (*MockDirEntry_IsDir_Call) Return ¶
func (_c *MockDirEntry_IsDir_Call) Return(_a0 bool) *MockDirEntry_IsDir_Call
func (*MockDirEntry_IsDir_Call) Run ¶
func (_c *MockDirEntry_IsDir_Call) Run(run func()) *MockDirEntry_IsDir_Call
func (*MockDirEntry_IsDir_Call) RunAndReturn ¶
func (_c *MockDirEntry_IsDir_Call) RunAndReturn(run func() bool) *MockDirEntry_IsDir_Call
type MockDirEntry_Name_Call ¶
MockDirEntry_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*MockDirEntry_Name_Call) Return ¶
func (_c *MockDirEntry_Name_Call) Return(_a0 string) *MockDirEntry_Name_Call
func (*MockDirEntry_Name_Call) Run ¶
func (_c *MockDirEntry_Name_Call) Run(run func()) *MockDirEntry_Name_Call
func (*MockDirEntry_Name_Call) RunAndReturn ¶
func (_c *MockDirEntry_Name_Call) RunAndReturn(run func() string) *MockDirEntry_Name_Call
type MockDirEntry_Type_Call ¶
MockDirEntry_Type_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Type'
func (*MockDirEntry_Type_Call) Return ¶
func (_c *MockDirEntry_Type_Call) Return(_a0 fs.FileMode) *MockDirEntry_Type_Call
func (*MockDirEntry_Type_Call) Run ¶
func (_c *MockDirEntry_Type_Call) Run(run func()) *MockDirEntry_Type_Call
func (*MockDirEntry_Type_Call) RunAndReturn ¶
func (_c *MockDirEntry_Type_Call) RunAndReturn(run func() fs.FileMode) *MockDirEntry_Type_Call
type MockRuntime ¶
MockRuntime is an autogenerated mock type for the Runtime type
func NewMockRuntime ¶
func NewMockRuntime(t interface { mock.TestingT Cleanup(func()) }) *MockRuntime
NewMockRuntime creates a new instance of MockRuntime. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockRuntime) APIVersion ¶
func (_m *MockRuntime) APIVersion() (container.Version, error)
APIVersion provides a mock function with given fields:
func (*MockRuntime) CheckpointContainer ¶
func (_m *MockRuntime) CheckpointContainer(ctx context.Context, options *v1.CheckpointContainerRequest) error
CheckpointContainer provides a mock function with given fields: ctx, options
func (*MockRuntime) DeleteContainer ¶
func (_m *MockRuntime) DeleteContainer(ctx context.Context, containerID container.ContainerID) error
DeleteContainer provides a mock function with given fields: ctx, containerID
func (*MockRuntime) EXPECT ¶
func (_m *MockRuntime) EXPECT() *MockRuntime_Expecter
func (*MockRuntime) GarbageCollect ¶
func (_m *MockRuntime) GarbageCollect(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error
GarbageCollect provides a mock function with given fields: ctx, gcPolicy, allSourcesReady, evictNonDeletedPods
func (*MockRuntime) GeneratePodStatus ¶
func (_m *MockRuntime) GeneratePodStatus(event *v1.ContainerEventResponse) (*container.PodStatus, error)
GeneratePodStatus provides a mock function with given fields: event
func (*MockRuntime) GetContainerLogs ¶
func (_m *MockRuntime) GetContainerLogs(ctx context.Context, pod *corev1.Pod, containerID container.ContainerID, logOptions *corev1.PodLogOptions, stdout io.Writer, stderr io.Writer) error
GetContainerLogs provides a mock function with given fields: ctx, pod, containerID, logOptions, stdout, stderr
func (*MockRuntime) GetContainerStatus ¶
func (_m *MockRuntime) GetContainerStatus(ctx context.Context, id container.ContainerID) (*container.Status, error)
GetContainerStatus provides a mock function with given fields: ctx, id
func (*MockRuntime) GetContainerSwapBehavior ¶
func (_m *MockRuntime) GetContainerSwapBehavior(pod *corev1.Pod, _a1 *corev1.Container) types.SwapBehavior
GetContainerSwapBehavior provides a mock function with given fields: pod, _a1
func (*MockRuntime) GetImageRef ¶
GetImageRef provides a mock function with given fields: ctx, image
func (*MockRuntime) GetImageSize ¶
GetImageSize provides a mock function with given fields: ctx, image
func (*MockRuntime) GetPodStatus ¶
func (_m *MockRuntime) GetPodStatus(ctx context.Context, uid pkgtypes.UID, name string, namespace string) (*container.PodStatus, error)
GetPodStatus provides a mock function with given fields: ctx, uid, name, namespace
func (*MockRuntime) GetPods ¶
GetPods provides a mock function with given fields: ctx, all
func (*MockRuntime) ImageFsInfo ¶
func (_m *MockRuntime) ImageFsInfo(ctx context.Context) (*v1.ImageFsInfoResponse, error)
ImageFsInfo provides a mock function with given fields: ctx
func (*MockRuntime) ImageStats ¶
func (_m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error)
ImageStats provides a mock function with given fields: ctx
func (*MockRuntime) KillPod ¶
func (_m *MockRuntime) KillPod(ctx context.Context, pod *corev1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error
KillPod provides a mock function with given fields: ctx, pod, runningPod, gracePeriodOverride
func (*MockRuntime) ListImages ¶
ListImages provides a mock function with given fields: ctx
func (*MockRuntime) ListMetricDescriptors ¶
func (_m *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v1.MetricDescriptor, error)
ListMetricDescriptors provides a mock function with given fields: ctx
func (*MockRuntime) ListPodSandboxMetrics ¶
func (_m *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v1.PodSandboxMetrics, error)
ListPodSandboxMetrics provides a mock function with given fields: ctx
func (*MockRuntime) PullImage ¶
func (_m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error)
PullImage provides a mock function with given fields: ctx, image, credentials, podSandboxConfig
func (*MockRuntime) RemoveImage ¶
RemoveImage provides a mock function with given fields: ctx, image
func (*MockRuntime) Status ¶
func (_m *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error)
Status provides a mock function with given fields: ctx
func (*MockRuntime) SyncPod ¶
func (_m *MockRuntime) SyncPod(ctx context.Context, pod *corev1.Pod, podStatus *container.PodStatus, pullSecrets []corev1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult
SyncPod provides a mock function with given fields: ctx, pod, podStatus, pullSecrets, backOff
func (*MockRuntime) Type ¶
func (_m *MockRuntime) Type() string
Type provides a mock function with given fields:
func (*MockRuntime) UpdatePodCIDR ¶
func (_m *MockRuntime) UpdatePodCIDR(ctx context.Context, podCIDR string) error
UpdatePodCIDR provides a mock function with given fields: ctx, podCIDR
func (*MockRuntime) Version ¶
Version provides a mock function with given fields: ctx
type MockRuntimeCache ¶
MockRuntimeCache is an autogenerated mock type for the RuntimeCache type
func NewMockRuntimeCache ¶
func NewMockRuntimeCache(t interface { mock.TestingT Cleanup(func()) }) *MockRuntimeCache
NewMockRuntimeCache creates a new instance of MockRuntimeCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockRuntimeCache) EXPECT ¶
func (_m *MockRuntimeCache) EXPECT() *MockRuntimeCache_Expecter
func (*MockRuntimeCache) ForceUpdateIfOlder ¶
ForceUpdateIfOlder provides a mock function with given fields: _a0, _a1
func (*MockRuntimeCache) GetPods ¶
GetPods provides a mock function with given fields: _a0
type MockRuntimeCache_Expecter ¶
type MockRuntimeCache_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRuntimeCache_Expecter) ForceUpdateIfOlder ¶
func (_e *MockRuntimeCache_Expecter) ForceUpdateIfOlder(_a0 interface{}, _a1 interface{}) *MockRuntimeCache_ForceUpdateIfOlder_Call
ForceUpdateIfOlder is a helper method to define mock.On call
- _a0 context.Context
- _a1 time.Time
func (*MockRuntimeCache_Expecter) GetPods ¶
func (_e *MockRuntimeCache_Expecter) GetPods(_a0 interface{}) *MockRuntimeCache_GetPods_Call
GetPods is a helper method to define mock.On call
- _a0 context.Context
type MockRuntimeCache_ForceUpdateIfOlder_Call ¶
MockRuntimeCache_ForceUpdateIfOlder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceUpdateIfOlder'
func (*MockRuntimeCache_ForceUpdateIfOlder_Call) Return ¶
func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) Return(_a0 error) *MockRuntimeCache_ForceUpdateIfOlder_Call
func (*MockRuntimeCache_ForceUpdateIfOlder_Call) Run ¶
func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) Run(run func(_a0 context.Context, _a1 time.Time)) *MockRuntimeCache_ForceUpdateIfOlder_Call
func (*MockRuntimeCache_ForceUpdateIfOlder_Call) RunAndReturn ¶
func (_c *MockRuntimeCache_ForceUpdateIfOlder_Call) RunAndReturn(run func(context.Context, time.Time) error) *MockRuntimeCache_ForceUpdateIfOlder_Call
type MockRuntimeCache_GetPods_Call ¶
MockRuntimeCache_GetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPods'
func (*MockRuntimeCache_GetPods_Call) Return ¶
func (_c *MockRuntimeCache_GetPods_Call) Return(_a0 []*container.Pod, _a1 error) *MockRuntimeCache_GetPods_Call
func (*MockRuntimeCache_GetPods_Call) Run ¶
func (_c *MockRuntimeCache_GetPods_Call) Run(run func(_a0 context.Context)) *MockRuntimeCache_GetPods_Call
func (*MockRuntimeCache_GetPods_Call) RunAndReturn ¶
func (_c *MockRuntimeCache_GetPods_Call) RunAndReturn(run func(context.Context) ([]*container.Pod, error)) *MockRuntimeCache_GetPods_Call
type MockRuntime_APIVersion_Call ¶
MockRuntime_APIVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'APIVersion'
func (*MockRuntime_APIVersion_Call) Return ¶
func (_c *MockRuntime_APIVersion_Call) Return(_a0 container.Version, _a1 error) *MockRuntime_APIVersion_Call
func (*MockRuntime_APIVersion_Call) Run ¶
func (_c *MockRuntime_APIVersion_Call) Run(run func()) *MockRuntime_APIVersion_Call
func (*MockRuntime_APIVersion_Call) RunAndReturn ¶
func (_c *MockRuntime_APIVersion_Call) RunAndReturn(run func() (container.Version, error)) *MockRuntime_APIVersion_Call
type MockRuntime_CheckpointContainer_Call ¶
MockRuntime_CheckpointContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckpointContainer'
func (*MockRuntime_CheckpointContainer_Call) Return ¶
func (_c *MockRuntime_CheckpointContainer_Call) Return(_a0 error) *MockRuntime_CheckpointContainer_Call
func (*MockRuntime_CheckpointContainer_Call) Run ¶
func (_c *MockRuntime_CheckpointContainer_Call) Run(run func(ctx context.Context, options *v1.CheckpointContainerRequest)) *MockRuntime_CheckpointContainer_Call
func (*MockRuntime_CheckpointContainer_Call) RunAndReturn ¶
func (_c *MockRuntime_CheckpointContainer_Call) RunAndReturn(run func(context.Context, *v1.CheckpointContainerRequest) error) *MockRuntime_CheckpointContainer_Call
type MockRuntime_DeleteContainer_Call ¶
MockRuntime_DeleteContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteContainer'
func (*MockRuntime_DeleteContainer_Call) Return ¶
func (_c *MockRuntime_DeleteContainer_Call) Return(_a0 error) *MockRuntime_DeleteContainer_Call
func (*MockRuntime_DeleteContainer_Call) Run ¶
func (_c *MockRuntime_DeleteContainer_Call) Run(run func(ctx context.Context, containerID container.ContainerID)) *MockRuntime_DeleteContainer_Call
func (*MockRuntime_DeleteContainer_Call) RunAndReturn ¶
func (_c *MockRuntime_DeleteContainer_Call) RunAndReturn(run func(context.Context, container.ContainerID) error) *MockRuntime_DeleteContainer_Call
type MockRuntime_Expecter ¶
type MockRuntime_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRuntime_Expecter) APIVersion ¶
func (_e *MockRuntime_Expecter) APIVersion() *MockRuntime_APIVersion_Call
APIVersion is a helper method to define mock.On call
func (*MockRuntime_Expecter) CheckpointContainer ¶
func (_e *MockRuntime_Expecter) CheckpointContainer(ctx interface{}, options interface{}) *MockRuntime_CheckpointContainer_Call
CheckpointContainer is a helper method to define mock.On call
- ctx context.Context
- options *v1.CheckpointContainerRequest
func (*MockRuntime_Expecter) DeleteContainer ¶
func (_e *MockRuntime_Expecter) DeleteContainer(ctx interface{}, containerID interface{}) *MockRuntime_DeleteContainer_Call
DeleteContainer is a helper method to define mock.On call
- ctx context.Context
- containerID container.ContainerID
func (*MockRuntime_Expecter) GarbageCollect ¶
func (_e *MockRuntime_Expecter) GarbageCollect(ctx interface{}, gcPolicy interface{}, allSourcesReady interface{}, evictNonDeletedPods interface{}) *MockRuntime_GarbageCollect_Call
GarbageCollect is a helper method to define mock.On call
- ctx context.Context
- gcPolicy container.GCPolicy
- allSourcesReady bool
- evictNonDeletedPods bool
func (*MockRuntime_Expecter) GeneratePodStatus ¶
func (_e *MockRuntime_Expecter) GeneratePodStatus(event interface{}) *MockRuntime_GeneratePodStatus_Call
GeneratePodStatus is a helper method to define mock.On call
- event *v1.ContainerEventResponse
func (*MockRuntime_Expecter) GetContainerLogs ¶
func (_e *MockRuntime_Expecter) GetContainerLogs(ctx interface{}, pod interface{}, containerID interface{}, logOptions interface{}, stdout interface{}, stderr interface{}) *MockRuntime_GetContainerLogs_Call
GetContainerLogs is a helper method to define mock.On call
- ctx context.Context
- pod *corev1.Pod
- containerID container.ContainerID
- logOptions *corev1.PodLogOptions
- stdout io.Writer
- stderr io.Writer
func (*MockRuntime_Expecter) GetContainerStatus ¶
func (_e *MockRuntime_Expecter) GetContainerStatus(ctx interface{}, id interface{}) *MockRuntime_GetContainerStatus_Call
GetContainerStatus is a helper method to define mock.On call
- ctx context.Context
- id container.ContainerID
func (*MockRuntime_Expecter) GetContainerSwapBehavior ¶
func (_e *MockRuntime_Expecter) GetContainerSwapBehavior(pod interface{}, _a1 interface{}) *MockRuntime_GetContainerSwapBehavior_Call
GetContainerSwapBehavior is a helper method to define mock.On call
- pod *corev1.Pod
- _a1 *corev1.Container
func (*MockRuntime_Expecter) GetImageRef ¶
func (_e *MockRuntime_Expecter) GetImageRef(ctx interface{}, image interface{}) *MockRuntime_GetImageRef_Call
GetImageRef is a helper method to define mock.On call
- ctx context.Context
- image container.ImageSpec
func (*MockRuntime_Expecter) GetImageSize ¶
func (_e *MockRuntime_Expecter) GetImageSize(ctx interface{}, image interface{}) *MockRuntime_GetImageSize_Call
GetImageSize is a helper method to define mock.On call
- ctx context.Context
- image container.ImageSpec
func (*MockRuntime_Expecter) GetPodStatus ¶
func (_e *MockRuntime_Expecter) GetPodStatus(ctx interface{}, uid interface{}, name interface{}, namespace interface{}) *MockRuntime_GetPodStatus_Call
GetPodStatus is a helper method to define mock.On call
- ctx context.Context
- uid pkgtypes.UID
- name string
- namespace string
func (*MockRuntime_Expecter) GetPods ¶
func (_e *MockRuntime_Expecter) GetPods(ctx interface{}, all interface{}) *MockRuntime_GetPods_Call
GetPods is a helper method to define mock.On call
- ctx context.Context
- all bool
func (*MockRuntime_Expecter) ImageFsInfo ¶
func (_e *MockRuntime_Expecter) ImageFsInfo(ctx interface{}) *MockRuntime_ImageFsInfo_Call
ImageFsInfo is a helper method to define mock.On call
- ctx context.Context
func (*MockRuntime_Expecter) ImageStats ¶
func (_e *MockRuntime_Expecter) ImageStats(ctx interface{}) *MockRuntime_ImageStats_Call
ImageStats is a helper method to define mock.On call
- ctx context.Context
func (*MockRuntime_Expecter) KillPod ¶
func (_e *MockRuntime_Expecter) KillPod(ctx interface{}, pod interface{}, runningPod interface{}, gracePeriodOverride interface{}) *MockRuntime_KillPod_Call
KillPod is a helper method to define mock.On call
- ctx context.Context
- pod *corev1.Pod
- runningPod container.Pod
- gracePeriodOverride *int64
func (*MockRuntime_Expecter) ListImages ¶
func (_e *MockRuntime_Expecter) ListImages(ctx interface{}) *MockRuntime_ListImages_Call
ListImages is a helper method to define mock.On call
- ctx context.Context
func (*MockRuntime_Expecter) ListMetricDescriptors ¶
func (_e *MockRuntime_Expecter) ListMetricDescriptors(ctx interface{}) *MockRuntime_ListMetricDescriptors_Call
ListMetricDescriptors is a helper method to define mock.On call
- ctx context.Context
func (*MockRuntime_Expecter) ListPodSandboxMetrics ¶
func (_e *MockRuntime_Expecter) ListPodSandboxMetrics(ctx interface{}) *MockRuntime_ListPodSandboxMetrics_Call
ListPodSandboxMetrics is a helper method to define mock.On call
- ctx context.Context
func (*MockRuntime_Expecter) PullImage ¶
func (_e *MockRuntime_Expecter) PullImage(ctx interface{}, image interface{}, credentials interface{}, podSandboxConfig interface{}) *MockRuntime_PullImage_Call
PullImage is a helper method to define mock.On call
- ctx context.Context
- image container.ImageSpec
- credentials []credentialprovider.TrackedAuthConfig
- podSandboxConfig *v1.PodSandboxConfig
func (*MockRuntime_Expecter) RemoveImage ¶
func (_e *MockRuntime_Expecter) RemoveImage(ctx interface{}, image interface{}) *MockRuntime_RemoveImage_Call
RemoveImage is a helper method to define mock.On call
- ctx context.Context
- image container.ImageSpec
func (*MockRuntime_Expecter) Status ¶
func (_e *MockRuntime_Expecter) Status(ctx interface{}) *MockRuntime_Status_Call
Status is a helper method to define mock.On call
- ctx context.Context
func (*MockRuntime_Expecter) SyncPod ¶
func (_e *MockRuntime_Expecter) SyncPod(ctx interface{}, pod interface{}, podStatus interface{}, pullSecrets interface{}, backOff interface{}) *MockRuntime_SyncPod_Call
SyncPod is a helper method to define mock.On call
- ctx context.Context
- pod *corev1.Pod
- podStatus *container.PodStatus
- pullSecrets []corev1.Secret
- backOff *flowcontrol.Backoff
func (*MockRuntime_Expecter) Type ¶
func (_e *MockRuntime_Expecter) Type() *MockRuntime_Type_Call
Type is a helper method to define mock.On call
func (*MockRuntime_Expecter) UpdatePodCIDR ¶
func (_e *MockRuntime_Expecter) UpdatePodCIDR(ctx interface{}, podCIDR interface{}) *MockRuntime_UpdatePodCIDR_Call
UpdatePodCIDR is a helper method to define mock.On call
- ctx context.Context
- podCIDR string
func (*MockRuntime_Expecter) Version ¶
func (_e *MockRuntime_Expecter) Version(ctx interface{}) *MockRuntime_Version_Call
Version is a helper method to define mock.On call
- ctx context.Context
type MockRuntime_GarbageCollect_Call ¶
MockRuntime_GarbageCollect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GarbageCollect'
func (*MockRuntime_GarbageCollect_Call) Return ¶
func (_c *MockRuntime_GarbageCollect_Call) Return(_a0 error) *MockRuntime_GarbageCollect_Call
func (*MockRuntime_GarbageCollect_Call) Run ¶
func (_c *MockRuntime_GarbageCollect_Call) Run(run func(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool)) *MockRuntime_GarbageCollect_Call
func (*MockRuntime_GarbageCollect_Call) RunAndReturn ¶
func (_c *MockRuntime_GarbageCollect_Call) RunAndReturn(run func(context.Context, container.GCPolicy, bool, bool) error) *MockRuntime_GarbageCollect_Call
type MockRuntime_GeneratePodStatus_Call ¶
MockRuntime_GeneratePodStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GeneratePodStatus'
func (*MockRuntime_GeneratePodStatus_Call) Return ¶
func (_c *MockRuntime_GeneratePodStatus_Call) Return(_a0 *container.PodStatus, _a1 error) *MockRuntime_GeneratePodStatus_Call
func (*MockRuntime_GeneratePodStatus_Call) Run ¶
func (_c *MockRuntime_GeneratePodStatus_Call) Run(run func(event *v1.ContainerEventResponse)) *MockRuntime_GeneratePodStatus_Call
func (*MockRuntime_GeneratePodStatus_Call) RunAndReturn ¶
func (_c *MockRuntime_GeneratePodStatus_Call) RunAndReturn(run func(*v1.ContainerEventResponse) (*container.PodStatus, error)) *MockRuntime_GeneratePodStatus_Call
type MockRuntime_GetContainerLogs_Call ¶
MockRuntime_GetContainerLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerLogs'
func (*MockRuntime_GetContainerLogs_Call) Return ¶
func (_c *MockRuntime_GetContainerLogs_Call) Return(err error) *MockRuntime_GetContainerLogs_Call
func (*MockRuntime_GetContainerLogs_Call) Run ¶
func (_c *MockRuntime_GetContainerLogs_Call) Run(run func(ctx context.Context, pod *corev1.Pod, containerID container.ContainerID, logOptions *corev1.PodLogOptions, stdout io.Writer, stderr io.Writer)) *MockRuntime_GetContainerLogs_Call
func (*MockRuntime_GetContainerLogs_Call) RunAndReturn ¶
func (_c *MockRuntime_GetContainerLogs_Call) RunAndReturn(run func(context.Context, *corev1.Pod, container.ContainerID, *corev1.PodLogOptions, io.Writer, io.Writer) error) *MockRuntime_GetContainerLogs_Call
type MockRuntime_GetContainerStatus_Call ¶
MockRuntime_GetContainerStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerStatus'
func (*MockRuntime_GetContainerStatus_Call) Return ¶
func (_c *MockRuntime_GetContainerStatus_Call) Return(_a0 *container.Status, _a1 error) *MockRuntime_GetContainerStatus_Call
func (*MockRuntime_GetContainerStatus_Call) Run ¶
func (_c *MockRuntime_GetContainerStatus_Call) Run(run func(ctx context.Context, id container.ContainerID)) *MockRuntime_GetContainerStatus_Call
func (*MockRuntime_GetContainerStatus_Call) RunAndReturn ¶
func (_c *MockRuntime_GetContainerStatus_Call) RunAndReturn(run func(context.Context, container.ContainerID) (*container.Status, error)) *MockRuntime_GetContainerStatus_Call
type MockRuntime_GetContainerSwapBehavior_Call ¶
MockRuntime_GetContainerSwapBehavior_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainerSwapBehavior'
func (*MockRuntime_GetContainerSwapBehavior_Call) Return ¶
func (_c *MockRuntime_GetContainerSwapBehavior_Call) Return(_a0 types.SwapBehavior) *MockRuntime_GetContainerSwapBehavior_Call
func (*MockRuntime_GetContainerSwapBehavior_Call) Run ¶
func (_c *MockRuntime_GetContainerSwapBehavior_Call) Run(run func(pod *corev1.Pod, _a1 *corev1.Container)) *MockRuntime_GetContainerSwapBehavior_Call
func (*MockRuntime_GetContainerSwapBehavior_Call) RunAndReturn ¶
func (_c *MockRuntime_GetContainerSwapBehavior_Call) RunAndReturn(run func(*corev1.Pod, *corev1.Container) types.SwapBehavior) *MockRuntime_GetContainerSwapBehavior_Call
type MockRuntime_GetImageRef_Call ¶
MockRuntime_GetImageRef_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImageRef'
func (*MockRuntime_GetImageRef_Call) Return ¶
func (_c *MockRuntime_GetImageRef_Call) Return(_a0 string, _a1 error) *MockRuntime_GetImageRef_Call
func (*MockRuntime_GetImageRef_Call) Run ¶
func (_c *MockRuntime_GetImageRef_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageRef_Call
func (*MockRuntime_GetImageRef_Call) RunAndReturn ¶
func (_c *MockRuntime_GetImageRef_Call) RunAndReturn(run func(context.Context, container.ImageSpec) (string, error)) *MockRuntime_GetImageRef_Call
type MockRuntime_GetImageSize_Call ¶
MockRuntime_GetImageSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImageSize'
func (*MockRuntime_GetImageSize_Call) Return ¶
func (_c *MockRuntime_GetImageSize_Call) Return(_a0 uint64, _a1 error) *MockRuntime_GetImageSize_Call
func (*MockRuntime_GetImageSize_Call) Run ¶
func (_c *MockRuntime_GetImageSize_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageSize_Call
func (*MockRuntime_GetImageSize_Call) RunAndReturn ¶
func (_c *MockRuntime_GetImageSize_Call) RunAndReturn(run func(context.Context, container.ImageSpec) (uint64, error)) *MockRuntime_GetImageSize_Call
type MockRuntime_GetPodStatus_Call ¶
MockRuntime_GetPodStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodStatus'
func (*MockRuntime_GetPodStatus_Call) Return ¶
func (_c *MockRuntime_GetPodStatus_Call) Return(_a0 *container.PodStatus, _a1 error) *MockRuntime_GetPodStatus_Call
func (*MockRuntime_GetPodStatus_Call) Run ¶
func (_c *MockRuntime_GetPodStatus_Call) Run(run func(ctx context.Context, uid pkgtypes.UID, name string, namespace string)) *MockRuntime_GetPodStatus_Call
func (*MockRuntime_GetPodStatus_Call) RunAndReturn ¶
func (_c *MockRuntime_GetPodStatus_Call) RunAndReturn(run func(context.Context, pkgtypes.UID, string, string) (*container.PodStatus, error)) *MockRuntime_GetPodStatus_Call
type MockRuntime_GetPods_Call ¶
MockRuntime_GetPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPods'
func (*MockRuntime_GetPods_Call) Return ¶
func (_c *MockRuntime_GetPods_Call) Return(_a0 []*container.Pod, _a1 error) *MockRuntime_GetPods_Call
func (*MockRuntime_GetPods_Call) Run ¶
func (_c *MockRuntime_GetPods_Call) Run(run func(ctx context.Context, all bool)) *MockRuntime_GetPods_Call
func (*MockRuntime_GetPods_Call) RunAndReturn ¶
func (_c *MockRuntime_GetPods_Call) RunAndReturn(run func(context.Context, bool) ([]*container.Pod, error)) *MockRuntime_GetPods_Call
type MockRuntime_ImageFsInfo_Call ¶
MockRuntime_ImageFsInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImageFsInfo'
func (*MockRuntime_ImageFsInfo_Call) Return ¶
func (_c *MockRuntime_ImageFsInfo_Call) Return(_a0 *v1.ImageFsInfoResponse, _a1 error) *MockRuntime_ImageFsInfo_Call
func (*MockRuntime_ImageFsInfo_Call) Run ¶
func (_c *MockRuntime_ImageFsInfo_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageFsInfo_Call
func (*MockRuntime_ImageFsInfo_Call) RunAndReturn ¶
func (_c *MockRuntime_ImageFsInfo_Call) RunAndReturn(run func(context.Context) (*v1.ImageFsInfoResponse, error)) *MockRuntime_ImageFsInfo_Call
type MockRuntime_ImageStats_Call ¶
MockRuntime_ImageStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImageStats'
func (*MockRuntime_ImageStats_Call) Return ¶
func (_c *MockRuntime_ImageStats_Call) Return(_a0 *container.ImageStats, _a1 error) *MockRuntime_ImageStats_Call
func (*MockRuntime_ImageStats_Call) Run ¶
func (_c *MockRuntime_ImageStats_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageStats_Call
func (*MockRuntime_ImageStats_Call) RunAndReturn ¶
func (_c *MockRuntime_ImageStats_Call) RunAndReturn(run func(context.Context) (*container.ImageStats, error)) *MockRuntime_ImageStats_Call
type MockRuntime_KillPod_Call ¶
MockRuntime_KillPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KillPod'
func (*MockRuntime_KillPod_Call) Return ¶
func (_c *MockRuntime_KillPod_Call) Return(_a0 error) *MockRuntime_KillPod_Call
func (*MockRuntime_KillPod_Call) Run ¶
func (_c *MockRuntime_KillPod_Call) Run(run func(ctx context.Context, pod *corev1.Pod, runningPod container.Pod, gracePeriodOverride *int64)) *MockRuntime_KillPod_Call
func (*MockRuntime_KillPod_Call) RunAndReturn ¶
func (_c *MockRuntime_KillPod_Call) RunAndReturn(run func(context.Context, *corev1.Pod, container.Pod, *int64) error) *MockRuntime_KillPod_Call
type MockRuntime_ListImages_Call ¶
MockRuntime_ListImages_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListImages'
func (*MockRuntime_ListImages_Call) Return ¶
func (_c *MockRuntime_ListImages_Call) Return(_a0 []container.Image, _a1 error) *MockRuntime_ListImages_Call
func (*MockRuntime_ListImages_Call) Run ¶
func (_c *MockRuntime_ListImages_Call) Run(run func(ctx context.Context)) *MockRuntime_ListImages_Call
func (*MockRuntime_ListImages_Call) RunAndReturn ¶
func (_c *MockRuntime_ListImages_Call) RunAndReturn(run func(context.Context) ([]container.Image, error)) *MockRuntime_ListImages_Call
type MockRuntime_ListMetricDescriptors_Call ¶
MockRuntime_ListMetricDescriptors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListMetricDescriptors'
func (*MockRuntime_ListMetricDescriptors_Call) Return ¶
func (_c *MockRuntime_ListMetricDescriptors_Call) Return(_a0 []*v1.MetricDescriptor, _a1 error) *MockRuntime_ListMetricDescriptors_Call
func (*MockRuntime_ListMetricDescriptors_Call) Run ¶
func (_c *MockRuntime_ListMetricDescriptors_Call) Run(run func(ctx context.Context)) *MockRuntime_ListMetricDescriptors_Call
func (*MockRuntime_ListMetricDescriptors_Call) RunAndReturn ¶
func (_c *MockRuntime_ListMetricDescriptors_Call) RunAndReturn(run func(context.Context) ([]*v1.MetricDescriptor, error)) *MockRuntime_ListMetricDescriptors_Call
type MockRuntime_ListPodSandboxMetrics_Call ¶
MockRuntime_ListPodSandboxMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPodSandboxMetrics'
func (*MockRuntime_ListPodSandboxMetrics_Call) Return ¶
func (_c *MockRuntime_ListPodSandboxMetrics_Call) Return(_a0 []*v1.PodSandboxMetrics, _a1 error) *MockRuntime_ListPodSandboxMetrics_Call
func (*MockRuntime_ListPodSandboxMetrics_Call) Run ¶
func (_c *MockRuntime_ListPodSandboxMetrics_Call) Run(run func(ctx context.Context)) *MockRuntime_ListPodSandboxMetrics_Call
func (*MockRuntime_ListPodSandboxMetrics_Call) RunAndReturn ¶
func (_c *MockRuntime_ListPodSandboxMetrics_Call) RunAndReturn(run func(context.Context) ([]*v1.PodSandboxMetrics, error)) *MockRuntime_ListPodSandboxMetrics_Call
type MockRuntime_PullImage_Call ¶
MockRuntime_PullImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PullImage'
func (*MockRuntime_PullImage_Call) Return ¶
func (_c *MockRuntime_PullImage_Call) Return(_a0 string, _a1 *credentialprovider.TrackedAuthConfig, _a2 error) *MockRuntime_PullImage_Call
func (*MockRuntime_PullImage_Call) Run ¶
func (_c *MockRuntime_PullImage_Call) Run(run func(ctx context.Context, image container.ImageSpec, credentials []credentialprovider.TrackedAuthConfig, podSandboxConfig *v1.PodSandboxConfig)) *MockRuntime_PullImage_Call
func (*MockRuntime_PullImage_Call) RunAndReturn ¶
func (_c *MockRuntime_PullImage_Call) RunAndReturn(run func(context.Context, container.ImageSpec, []credentialprovider.TrackedAuthConfig, *v1.PodSandboxConfig) (string, *credentialprovider.TrackedAuthConfig, error)) *MockRuntime_PullImage_Call
type MockRuntime_RemoveImage_Call ¶
MockRuntime_RemoveImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveImage'
func (*MockRuntime_RemoveImage_Call) Return ¶
func (_c *MockRuntime_RemoveImage_Call) Return(_a0 error) *MockRuntime_RemoveImage_Call
func (*MockRuntime_RemoveImage_Call) Run ¶
func (_c *MockRuntime_RemoveImage_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_RemoveImage_Call
func (*MockRuntime_RemoveImage_Call) RunAndReturn ¶
func (_c *MockRuntime_RemoveImage_Call) RunAndReturn(run func(context.Context, container.ImageSpec) error) *MockRuntime_RemoveImage_Call
type MockRuntime_Status_Call ¶
MockRuntime_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status'
func (*MockRuntime_Status_Call) Return ¶
func (_c *MockRuntime_Status_Call) Return(_a0 *container.RuntimeStatus, _a1 error) *MockRuntime_Status_Call
func (*MockRuntime_Status_Call) Run ¶
func (_c *MockRuntime_Status_Call) Run(run func(ctx context.Context)) *MockRuntime_Status_Call
func (*MockRuntime_Status_Call) RunAndReturn ¶
func (_c *MockRuntime_Status_Call) RunAndReturn(run func(context.Context) (*container.RuntimeStatus, error)) *MockRuntime_Status_Call
type MockRuntime_SyncPod_Call ¶
MockRuntime_SyncPod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncPod'
func (*MockRuntime_SyncPod_Call) Return ¶
func (_c *MockRuntime_SyncPod_Call) Return(_a0 container.PodSyncResult) *MockRuntime_SyncPod_Call
func (*MockRuntime_SyncPod_Call) Run ¶
func (_c *MockRuntime_SyncPod_Call) Run(run func(ctx context.Context, pod *corev1.Pod, podStatus *container.PodStatus, pullSecrets []corev1.Secret, backOff *flowcontrol.Backoff)) *MockRuntime_SyncPod_Call
func (*MockRuntime_SyncPod_Call) RunAndReturn ¶
func (_c *MockRuntime_SyncPod_Call) RunAndReturn(run func(context.Context, *corev1.Pod, *container.PodStatus, []corev1.Secret, *flowcontrol.Backoff) container.PodSyncResult) *MockRuntime_SyncPod_Call
type MockRuntime_Type_Call ¶
MockRuntime_Type_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Type'
func (*MockRuntime_Type_Call) Return ¶
func (_c *MockRuntime_Type_Call) Return(_a0 string) *MockRuntime_Type_Call
func (*MockRuntime_Type_Call) Run ¶
func (_c *MockRuntime_Type_Call) Run(run func()) *MockRuntime_Type_Call
func (*MockRuntime_Type_Call) RunAndReturn ¶
func (_c *MockRuntime_Type_Call) RunAndReturn(run func() string) *MockRuntime_Type_Call
type MockRuntime_UpdatePodCIDR_Call ¶
MockRuntime_UpdatePodCIDR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePodCIDR'
func (*MockRuntime_UpdatePodCIDR_Call) Return ¶
func (_c *MockRuntime_UpdatePodCIDR_Call) Return(_a0 error) *MockRuntime_UpdatePodCIDR_Call
func (*MockRuntime_UpdatePodCIDR_Call) Run ¶
func (_c *MockRuntime_UpdatePodCIDR_Call) Run(run func(ctx context.Context, podCIDR string)) *MockRuntime_UpdatePodCIDR_Call
func (*MockRuntime_UpdatePodCIDR_Call) RunAndReturn ¶
func (_c *MockRuntime_UpdatePodCIDR_Call) RunAndReturn(run func(context.Context, string) error) *MockRuntime_UpdatePodCIDR_Call
type MockRuntime_Version_Call ¶
MockRuntime_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version'
func (*MockRuntime_Version_Call) Return ¶
func (_c *MockRuntime_Version_Call) Return(_a0 container.Version, _a1 error) *MockRuntime_Version_Call
func (*MockRuntime_Version_Call) Run ¶
func (_c *MockRuntime_Version_Call) Run(run func(ctx context.Context)) *MockRuntime_Version_Call
func (*MockRuntime_Version_Call) RunAndReturn ¶
func (_c *MockRuntime_Version_Call) RunAndReturn(run func(context.Context) (container.Version, error)) *MockRuntime_Version_Call
type TB ¶
Source Files ¶
fake_cache.go fake_ready_provider.go fake_runtime.go fake_runtime_helper.go mock_runtime_cache.go mockdirentry.go os.go runtime_mock.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 21 packages
- Last checked
- 3 hours ago –
Tools for package owners.