kubernetes/pkg/kubelet/container/testing/runtime_mock.go

type MockRuntime

type MockRuntime_Expecter

func (_m *MockRuntime) EXPECT() *MockRuntime_Expecter {}

// APIVersion provides a mock function with given fields:
func (_m *MockRuntime) APIVersion() (container.Version, error) {}

type MockRuntime_APIVersion_Call

// APIVersion is a helper method to define mock.On call
func (_e *MockRuntime_Expecter) APIVersion() *MockRuntime_APIVersion_Call {}

func (_c *MockRuntime_APIVersion_Call) Run(run func()) *MockRuntime_APIVersion_Call {}

func (_c *MockRuntime_APIVersion_Call) Return(_a0 container.Version, _a1 error) *MockRuntime_APIVersion_Call {}

func (_c *MockRuntime_APIVersion_Call) RunAndReturn(run func() (container.Version, error)) *MockRuntime_APIVersion_Call {}

// CheckpointContainer provides a mock function with given fields: ctx, options
func (_m *MockRuntime) CheckpointContainer(ctx context.Context, options *v1.CheckpointContainerRequest) error {}

type MockRuntime_CheckpointContainer_Call

// CheckpointContainer is a helper method to define mock.On call
//   - ctx context.Context
//   - options *v1.CheckpointContainerRequest
func (_e *MockRuntime_Expecter) CheckpointContainer(ctx interface{}

func (_c *MockRuntime_CheckpointContainer_Call) Run(run func(ctx context.Context, options *v1.CheckpointContainerRequest)) *MockRuntime_CheckpointContainer_Call {}

func (_c *MockRuntime_CheckpointContainer_Call) Return(_a0 error) *MockRuntime_CheckpointContainer_Call {}

func (_c *MockRuntime_CheckpointContainer_Call) RunAndReturn(run func(context.Context, *v1.CheckpointContainerRequest) error) *MockRuntime_CheckpointContainer_Call {}

// DeleteContainer provides a mock function with given fields: ctx, containerID
func (_m *MockRuntime) DeleteContainer(ctx context.Context, containerID container.ContainerID) error {}

type MockRuntime_DeleteContainer_Call

// DeleteContainer is a helper method to define mock.On call
//   - ctx context.Context
//   - containerID container.ContainerID
func (_e *MockRuntime_Expecter) DeleteContainer(ctx interface{}

func (_c *MockRuntime_DeleteContainer_Call) Run(run func(ctx context.Context, containerID container.ContainerID)) *MockRuntime_DeleteContainer_Call {}

func (_c *MockRuntime_DeleteContainer_Call) Return(_a0 error) *MockRuntime_DeleteContainer_Call {}

func (_c *MockRuntime_DeleteContainer_Call) RunAndReturn(run func(context.Context, container.ContainerID) error) *MockRuntime_DeleteContainer_Call {}

// GarbageCollect provides a mock function with given fields: ctx, gcPolicy, allSourcesReady, evictNonDeletedPods
func (_m *MockRuntime) GarbageCollect(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error {}

type MockRuntime_GarbageCollect_Call

// GarbageCollect is a helper method to define mock.On call
//   - ctx context.Context
//   - gcPolicy container.GCPolicy
//   - allSourcesReady bool
//   - evictNonDeletedPods bool
func (_e *MockRuntime_Expecter) GarbageCollect(ctx interface{}

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) Return(_a0 error) *MockRuntime_GarbageCollect_Call {}

func (_c *MockRuntime_GarbageCollect_Call) RunAndReturn(run func(context.Context, container.GCPolicy, bool, bool) error) *MockRuntime_GarbageCollect_Call {}

// GeneratePodStatus provides a mock function with given fields: event
func (_m *MockRuntime) GeneratePodStatus(event *v1.ContainerEventResponse) (*container.PodStatus, error) {}

type MockRuntime_GeneratePodStatus_Call

// GeneratePodStatus is a helper method to define mock.On call
//   - event *v1.ContainerEventResponse
func (_e *MockRuntime_Expecter) GeneratePodStatus(event interface{}

func (_c *MockRuntime_GeneratePodStatus_Call) Run(run func(event *v1.ContainerEventResponse)) *MockRuntime_GeneratePodStatus_Call {}

func (_c *MockRuntime_GeneratePodStatus_Call) Return(_a0 *container.PodStatus, _a1 error) *MockRuntime_GeneratePodStatus_Call {}

func (_c *MockRuntime_GeneratePodStatus_Call) RunAndReturn(run func(*v1.ContainerEventResponse) (*container.PodStatus, error)) *MockRuntime_GeneratePodStatus_Call {}

// GetContainerLogs provides a mock function with given fields: ctx, pod, containerID, logOptions, stdout, stderr
func (_m *MockRuntime) GetContainerLogs(ctx context.Context, pod *corev1.Pod, containerID container.ContainerID, logOptions *corev1.PodLogOptions, stdout io.Writer, stderr io.Writer) error {}

type 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 (_e *MockRuntime_Expecter) GetContainerLogs(ctx interface{}

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) Return(err error) *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 {}

// GetContainerStatus provides a mock function with given fields: ctx, id
func (_m *MockRuntime) GetContainerStatus(ctx context.Context, id container.ContainerID) (*container.Status, error) {}

type MockRuntime_GetContainerStatus_Call

// GetContainerStatus is a helper method to define mock.On call
//   - ctx context.Context
//   - id container.ContainerID
func (_e *MockRuntime_Expecter) GetContainerStatus(ctx interface{}

func (_c *MockRuntime_GetContainerStatus_Call) Run(run func(ctx context.Context, id container.ContainerID)) *MockRuntime_GetContainerStatus_Call {}

func (_c *MockRuntime_GetContainerStatus_Call) Return(_a0 *container.Status, _a1 error) *MockRuntime_GetContainerStatus_Call {}

func (_c *MockRuntime_GetContainerStatus_Call) RunAndReturn(run func(context.Context, container.ContainerID) (*container.Status, error)) *MockRuntime_GetContainerStatus_Call {}

// GetImageRef provides a mock function with given fields: ctx, image
func (_m *MockRuntime) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error) {}

type MockRuntime_GetImageRef_Call

// GetImageRef is a helper method to define mock.On call
//   - ctx context.Context
//   - image container.ImageSpec
func (_e *MockRuntime_Expecter) GetImageRef(ctx interface{}

func (_c *MockRuntime_GetImageRef_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageRef_Call {}

func (_c *MockRuntime_GetImageRef_Call) Return(_a0 string, _a1 error) *MockRuntime_GetImageRef_Call {}

func (_c *MockRuntime_GetImageRef_Call) RunAndReturn(run func(context.Context, container.ImageSpec) (string, error)) *MockRuntime_GetImageRef_Call {}

// GetImageSize provides a mock function with given fields: ctx, image
func (_m *MockRuntime) GetImageSize(ctx context.Context, image container.ImageSpec) (uint64, error) {}

type MockRuntime_GetImageSize_Call

// GetImageSize is a helper method to define mock.On call
//   - ctx context.Context
//   - image container.ImageSpec
func (_e *MockRuntime_Expecter) GetImageSize(ctx interface{}

func (_c *MockRuntime_GetImageSize_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_GetImageSize_Call {}

func (_c *MockRuntime_GetImageSize_Call) Return(_a0 uint64, _a1 error) *MockRuntime_GetImageSize_Call {}

func (_c *MockRuntime_GetImageSize_Call) RunAndReturn(run func(context.Context, container.ImageSpec) (uint64, error)) *MockRuntime_GetImageSize_Call {}

// GetPodStatus provides a mock function with given fields: ctx, uid, name, namespace
func (_m *MockRuntime) GetPodStatus(ctx context.Context, uid types.UID, name string, namespace string) (*container.PodStatus, error) {}

type MockRuntime_GetPodStatus_Call

// GetPodStatus is a helper method to define mock.On call
//   - ctx context.Context
//   - uid types.UID
//   - name string
//   - namespace string
func (_e *MockRuntime_Expecter) GetPodStatus(ctx interface{}

func (_c *MockRuntime_GetPodStatus_Call) Run(run func(ctx context.Context, uid types.UID, name string, namespace string)) *MockRuntime_GetPodStatus_Call {}

func (_c *MockRuntime_GetPodStatus_Call) Return(_a0 *container.PodStatus, _a1 error) *MockRuntime_GetPodStatus_Call {}

func (_c *MockRuntime_GetPodStatus_Call) RunAndReturn(run func(context.Context, types.UID, string, string) (*container.PodStatus, error)) *MockRuntime_GetPodStatus_Call {}

// GetPods provides a mock function with given fields: ctx, all
func (_m *MockRuntime) GetPods(ctx context.Context, all bool) ([]*container.Pod, error) {}

type MockRuntime_GetPods_Call

// GetPods is a helper method to define mock.On call
//   - ctx context.Context
//   - all bool
func (_e *MockRuntime_Expecter) GetPods(ctx interface{}

func (_c *MockRuntime_GetPods_Call) Run(run func(ctx context.Context, all bool)) *MockRuntime_GetPods_Call {}

func (_c *MockRuntime_GetPods_Call) Return(_a0 []*container.Pod, _a1 error) *MockRuntime_GetPods_Call {}

func (_c *MockRuntime_GetPods_Call) RunAndReturn(run func(context.Context, bool) ([]*container.Pod, error)) *MockRuntime_GetPods_Call {}

// ImageFsInfo provides a mock function with given fields: ctx
func (_m *MockRuntime) ImageFsInfo(ctx context.Context) (*v1.ImageFsInfoResponse, error) {}

type MockRuntime_ImageFsInfo_Call

// ImageFsInfo is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockRuntime_Expecter) ImageFsInfo(ctx interface{}

func (_c *MockRuntime_ImageFsInfo_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageFsInfo_Call {}

func (_c *MockRuntime_ImageFsInfo_Call) Return(_a0 *v1.ImageFsInfoResponse, _a1 error) *MockRuntime_ImageFsInfo_Call {}

func (_c *MockRuntime_ImageFsInfo_Call) RunAndReturn(run func(context.Context) (*v1.ImageFsInfoResponse, error)) *MockRuntime_ImageFsInfo_Call {}

// ImageStats provides a mock function with given fields: ctx
func (_m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error) {}

type MockRuntime_ImageStats_Call

// ImageStats is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockRuntime_Expecter) ImageStats(ctx interface{}

func (_c *MockRuntime_ImageStats_Call) Run(run func(ctx context.Context)) *MockRuntime_ImageStats_Call {}

func (_c *MockRuntime_ImageStats_Call) Return(_a0 *container.ImageStats, _a1 error) *MockRuntime_ImageStats_Call {}

func (_c *MockRuntime_ImageStats_Call) RunAndReturn(run func(context.Context) (*container.ImageStats, error)) *MockRuntime_ImageStats_Call {}

// KillPod provides a mock function with given fields: ctx, pod, runningPod, gracePeriodOverride
func (_m *MockRuntime) KillPod(ctx context.Context, pod *corev1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error {}

type 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 (_e *MockRuntime_Expecter) KillPod(ctx interface{}

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) Return(_a0 error) *MockRuntime_KillPod_Call {}

func (_c *MockRuntime_KillPod_Call) RunAndReturn(run func(context.Context, *corev1.Pod, container.Pod, *int64) error) *MockRuntime_KillPod_Call {}

// ListImages provides a mock function with given fields: ctx
func (_m *MockRuntime) ListImages(ctx context.Context) ([]container.Image, error) {}

type MockRuntime_ListImages_Call

// ListImages is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockRuntime_Expecter) ListImages(ctx interface{}

func (_c *MockRuntime_ListImages_Call) Run(run func(ctx context.Context)) *MockRuntime_ListImages_Call {}

func (_c *MockRuntime_ListImages_Call) Return(_a0 []container.Image, _a1 error) *MockRuntime_ListImages_Call {}

func (_c *MockRuntime_ListImages_Call) RunAndReturn(run func(context.Context) ([]container.Image, error)) *MockRuntime_ListImages_Call {}

// ListMetricDescriptors provides a mock function with given fields: ctx
func (_m *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v1.MetricDescriptor, error) {}

type MockRuntime_ListMetricDescriptors_Call

// ListMetricDescriptors is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockRuntime_Expecter) ListMetricDescriptors(ctx interface{}

func (_c *MockRuntime_ListMetricDescriptors_Call) Run(run func(ctx context.Context)) *MockRuntime_ListMetricDescriptors_Call {}

func (_c *MockRuntime_ListMetricDescriptors_Call) Return(_a0 []*v1.MetricDescriptor, _a1 error) *MockRuntime_ListMetricDescriptors_Call {}

func (_c *MockRuntime_ListMetricDescriptors_Call) RunAndReturn(run func(context.Context) ([]*v1.MetricDescriptor, error)) *MockRuntime_ListMetricDescriptors_Call {}

// ListPodSandboxMetrics provides a mock function with given fields: ctx
func (_m *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v1.PodSandboxMetrics, error) {}

type MockRuntime_ListPodSandboxMetrics_Call

// ListPodSandboxMetrics is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockRuntime_Expecter) ListPodSandboxMetrics(ctx interface{}

func (_c *MockRuntime_ListPodSandboxMetrics_Call) Run(run func(ctx context.Context)) *MockRuntime_ListPodSandboxMetrics_Call {}

func (_c *MockRuntime_ListPodSandboxMetrics_Call) Return(_a0 []*v1.PodSandboxMetrics, _a1 error) *MockRuntime_ListPodSandboxMetrics_Call {}

func (_c *MockRuntime_ListPodSandboxMetrics_Call) RunAndReturn(run func(context.Context) ([]*v1.PodSandboxMetrics, error)) *MockRuntime_ListPodSandboxMetrics_Call {}

// PullImage provides a mock function with given fields: ctx, image, pullSecrets, podSandboxConfig
func (_m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []corev1.Secret, podSandboxConfig *v1.PodSandboxConfig) (string, error) {}

type MockRuntime_PullImage_Call

// PullImage is a helper method to define mock.On call
//   - ctx context.Context
//   - image container.ImageSpec
//   - pullSecrets []corev1.Secret
//   - podSandboxConfig *v1.PodSandboxConfig
func (_e *MockRuntime_Expecter) PullImage(ctx interface{}

func (_c *MockRuntime_PullImage_Call) Run(run func(ctx context.Context, image container.ImageSpec, pullSecrets []corev1.Secret, podSandboxConfig *v1.PodSandboxConfig)) *MockRuntime_PullImage_Call {}

func (_c *MockRuntime_PullImage_Call) Return(_a0 string, _a1 error) *MockRuntime_PullImage_Call {}

func (_c *MockRuntime_PullImage_Call) RunAndReturn(run func(context.Context, container.ImageSpec, []corev1.Secret, *v1.PodSandboxConfig) (string, error)) *MockRuntime_PullImage_Call {}

// RemoveImage provides a mock function with given fields: ctx, image
func (_m *MockRuntime) RemoveImage(ctx context.Context, image container.ImageSpec) error {}

type MockRuntime_RemoveImage_Call

// RemoveImage is a helper method to define mock.On call
//   - ctx context.Context
//   - image container.ImageSpec
func (_e *MockRuntime_Expecter) RemoveImage(ctx interface{}

func (_c *MockRuntime_RemoveImage_Call) Run(run func(ctx context.Context, image container.ImageSpec)) *MockRuntime_RemoveImage_Call {}

func (_c *MockRuntime_RemoveImage_Call) Return(_a0 error) *MockRuntime_RemoveImage_Call {}

func (_c *MockRuntime_RemoveImage_Call) RunAndReturn(run func(context.Context, container.ImageSpec) error) *MockRuntime_RemoveImage_Call {}

// Status provides a mock function with given fields: ctx
func (_m *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error) {}

type MockRuntime_Status_Call

// Status is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockRuntime_Expecter) Status(ctx interface{}

func (_c *MockRuntime_Status_Call) Run(run func(ctx context.Context)) *MockRuntime_Status_Call {}

func (_c *MockRuntime_Status_Call) Return(_a0 *container.RuntimeStatus, _a1 error) *MockRuntime_Status_Call {}

func (_c *MockRuntime_Status_Call) RunAndReturn(run func(context.Context) (*container.RuntimeStatus, error)) *MockRuntime_Status_Call {}

// SyncPod provides a mock function with given fields: ctx, pod, podStatus, pullSecrets, backOff
func (_m *MockRuntime) SyncPod(ctx context.Context, pod *corev1.Pod, podStatus *container.PodStatus, pullSecrets []corev1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult {}

type 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 (_e *MockRuntime_Expecter) SyncPod(ctx interface{}

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) Return(_a0 container.PodSyncResult) *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 provides a mock function with given fields:
func (_m *MockRuntime) Type() string {}

type MockRuntime_Type_Call

// Type is a helper method to define mock.On call
func (_e *MockRuntime_Expecter) Type() *MockRuntime_Type_Call {}

func (_c *MockRuntime_Type_Call) Run(run func()) *MockRuntime_Type_Call {}

func (_c *MockRuntime_Type_Call) Return(_a0 string) *MockRuntime_Type_Call {}

func (_c *MockRuntime_Type_Call) RunAndReturn(run func() string) *MockRuntime_Type_Call {}

// UpdatePodCIDR provides a mock function with given fields: ctx, podCIDR
func (_m *MockRuntime) UpdatePodCIDR(ctx context.Context, podCIDR string) error {}

type MockRuntime_UpdatePodCIDR_Call

// UpdatePodCIDR is a helper method to define mock.On call
//   - ctx context.Context
//   - podCIDR string
func (_e *MockRuntime_Expecter) UpdatePodCIDR(ctx interface{}

func (_c *MockRuntime_UpdatePodCIDR_Call) Run(run func(ctx context.Context, podCIDR string)) *MockRuntime_UpdatePodCIDR_Call {}

func (_c *MockRuntime_UpdatePodCIDR_Call) Return(_a0 error) *MockRuntime_UpdatePodCIDR_Call {}

func (_c *MockRuntime_UpdatePodCIDR_Call) RunAndReturn(run func(context.Context, string) error) *MockRuntime_UpdatePodCIDR_Call {}

// Version provides a mock function with given fields: ctx
func (_m *MockRuntime) Version(ctx context.Context) (container.Version, error) {}

type MockRuntime_Version_Call

// Version is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockRuntime_Expecter) Version(ctx interface{}

func (_c *MockRuntime_Version_Call) Run(run func(ctx context.Context)) *MockRuntime_Version_Call {}

func (_c *MockRuntime_Version_Call) Return(_a0 container.Version, _a1 error) *MockRuntime_Version_Call {}

func (_c *MockRuntime_Version_Call) RunAndReturn(run func(context.Context) (container.Version, error)) *MockRuntime_Version_Call {}

// 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 NewMockRuntime(t interface {}