...

Source file src/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go

Documentation: k8s.io/kubernetes/pkg/kubelet/container/testing

     1  /*
     2  Copyright The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // Code generated by MockGen. DO NOT EDIT.
    18  // Source: runtime.go
    19  
    20  // Package testing is a generated GoMock package.
    21  package testing
    22  
    23  import (
    24  	context "context"
    25  	io "io"
    26  	url "net/url"
    27  	reflect "reflect"
    28  	time "time"
    29  
    30  	gomock "github.com/golang/mock/gomock"
    31  	v1 "k8s.io/api/core/v1"
    32  	types "k8s.io/apimachinery/pkg/types"
    33  	remotecommand "k8s.io/client-go/tools/remotecommand"
    34  	flowcontrol "k8s.io/client-go/util/flowcontrol"
    35  	v10 "k8s.io/cri-api/pkg/apis/runtime/v1"
    36  	container "k8s.io/kubernetes/pkg/kubelet/container"
    37  )
    38  
    39  // MockVersion is a mock of Version interface.
    40  type MockVersion struct {
    41  	ctrl     *gomock.Controller
    42  	recorder *MockVersionMockRecorder
    43  }
    44  
    45  // MockVersionMockRecorder is the mock recorder for MockVersion.
    46  type MockVersionMockRecorder struct {
    47  	mock *MockVersion
    48  }
    49  
    50  // NewMockVersion creates a new mock instance.
    51  func NewMockVersion(ctrl *gomock.Controller) *MockVersion {
    52  	mock := &MockVersion{ctrl: ctrl}
    53  	mock.recorder = &MockVersionMockRecorder{mock}
    54  	return mock
    55  }
    56  
    57  // EXPECT returns an object that allows the caller to indicate expected use.
    58  func (m *MockVersion) EXPECT() *MockVersionMockRecorder {
    59  	return m.recorder
    60  }
    61  
    62  // Compare mocks base method.
    63  func (m *MockVersion) Compare(other string) (int, error) {
    64  	m.ctrl.T.Helper()
    65  	ret := m.ctrl.Call(m, "Compare", other)
    66  	ret0, _ := ret[0].(int)
    67  	ret1, _ := ret[1].(error)
    68  	return ret0, ret1
    69  }
    70  
    71  // Compare indicates an expected call of Compare.
    72  func (mr *MockVersionMockRecorder) Compare(other interface{}) *gomock.Call {
    73  	mr.mock.ctrl.T.Helper()
    74  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Compare", reflect.TypeOf((*MockVersion)(nil).Compare), other)
    75  }
    76  
    77  // String mocks base method.
    78  func (m *MockVersion) String() string {
    79  	m.ctrl.T.Helper()
    80  	ret := m.ctrl.Call(m, "String")
    81  	ret0, _ := ret[0].(string)
    82  	return ret0
    83  }
    84  
    85  // String indicates an expected call of String.
    86  func (mr *MockVersionMockRecorder) String() *gomock.Call {
    87  	mr.mock.ctrl.T.Helper()
    88  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockVersion)(nil).String))
    89  }
    90  
    91  // MockRuntime is a mock of Runtime interface.
    92  type MockRuntime struct {
    93  	ctrl     *gomock.Controller
    94  	recorder *MockRuntimeMockRecorder
    95  }
    96  
    97  // MockRuntimeMockRecorder is the mock recorder for MockRuntime.
    98  type MockRuntimeMockRecorder struct {
    99  	mock *MockRuntime
   100  }
   101  
   102  // NewMockRuntime creates a new mock instance.
   103  func NewMockRuntime(ctrl *gomock.Controller) *MockRuntime {
   104  	mock := &MockRuntime{ctrl: ctrl}
   105  	mock.recorder = &MockRuntimeMockRecorder{mock}
   106  	return mock
   107  }
   108  
   109  // EXPECT returns an object that allows the caller to indicate expected use.
   110  func (m *MockRuntime) EXPECT() *MockRuntimeMockRecorder {
   111  	return m.recorder
   112  }
   113  
   114  // APIVersion mocks base method.
   115  func (m *MockRuntime) APIVersion() (container.Version, error) {
   116  	m.ctrl.T.Helper()
   117  	ret := m.ctrl.Call(m, "APIVersion")
   118  	ret0, _ := ret[0].(container.Version)
   119  	ret1, _ := ret[1].(error)
   120  	return ret0, ret1
   121  }
   122  
   123  // APIVersion indicates an expected call of APIVersion.
   124  func (mr *MockRuntimeMockRecorder) APIVersion() *gomock.Call {
   125  	mr.mock.ctrl.T.Helper()
   126  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockRuntime)(nil).APIVersion))
   127  }
   128  
   129  // CheckpointContainer mocks base method.
   130  func (m *MockRuntime) CheckpointContainer(ctx context.Context, options *v10.CheckpointContainerRequest) error {
   131  	m.ctrl.T.Helper()
   132  	ret := m.ctrl.Call(m, "CheckpointContainer", ctx, options)
   133  	ret0, _ := ret[0].(error)
   134  	return ret0
   135  }
   136  
   137  // CheckpointContainer indicates an expected call of CheckpointContainer.
   138  func (mr *MockRuntimeMockRecorder) CheckpointContainer(ctx, options interface{}) *gomock.Call {
   139  	mr.mock.ctrl.T.Helper()
   140  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckpointContainer", reflect.TypeOf((*MockRuntime)(nil).CheckpointContainer), ctx, options)
   141  }
   142  
   143  // DeleteContainer mocks base method.
   144  func (m *MockRuntime) DeleteContainer(ctx context.Context, containerID container.ContainerID) error {
   145  	m.ctrl.T.Helper()
   146  	ret := m.ctrl.Call(m, "DeleteContainer", ctx, containerID)
   147  	ret0, _ := ret[0].(error)
   148  	return ret0
   149  }
   150  
   151  // DeleteContainer indicates an expected call of DeleteContainer.
   152  func (mr *MockRuntimeMockRecorder) DeleteContainer(ctx, containerID interface{}) *gomock.Call {
   153  	mr.mock.ctrl.T.Helper()
   154  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainer", reflect.TypeOf((*MockRuntime)(nil).DeleteContainer), ctx, containerID)
   155  }
   156  
   157  // GarbageCollect mocks base method.
   158  func (m *MockRuntime) GarbageCollect(ctx context.Context, gcPolicy container.GCPolicy, allSourcesReady, evictNonDeletedPods bool) error {
   159  	m.ctrl.T.Helper()
   160  	ret := m.ctrl.Call(m, "GarbageCollect", ctx, gcPolicy, allSourcesReady, evictNonDeletedPods)
   161  	ret0, _ := ret[0].(error)
   162  	return ret0
   163  }
   164  
   165  // GarbageCollect indicates an expected call of GarbageCollect.
   166  func (mr *MockRuntimeMockRecorder) GarbageCollect(ctx, gcPolicy, allSourcesReady, evictNonDeletedPods interface{}) *gomock.Call {
   167  	mr.mock.ctrl.T.Helper()
   168  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GarbageCollect", reflect.TypeOf((*MockRuntime)(nil).GarbageCollect), ctx, gcPolicy, allSourcesReady, evictNonDeletedPods)
   169  }
   170  
   171  // GeneratePodStatus mocks base method.
   172  func (m *MockRuntime) GeneratePodStatus(event *v10.ContainerEventResponse) (*container.PodStatus, error) {
   173  	m.ctrl.T.Helper()
   174  	ret := m.ctrl.Call(m, "GeneratePodStatus", event)
   175  	ret0, _ := ret[0].(*container.PodStatus)
   176  	ret1, _ := ret[1].(error)
   177  	return ret0, ret1
   178  }
   179  
   180  // GeneratePodStatus indicates an expected call of GeneratePodStatus.
   181  func (mr *MockRuntimeMockRecorder) GeneratePodStatus(event interface{}) *gomock.Call {
   182  	mr.mock.ctrl.T.Helper()
   183  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GeneratePodStatus", reflect.TypeOf((*MockRuntime)(nil).GeneratePodStatus), event)
   184  }
   185  
   186  // GetContainerLogs mocks base method.
   187  func (m *MockRuntime) GetContainerLogs(ctx context.Context, pod *v1.Pod, containerID container.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error {
   188  	m.ctrl.T.Helper()
   189  	ret := m.ctrl.Call(m, "GetContainerLogs", ctx, pod, containerID, logOptions, stdout, stderr)
   190  	ret0, _ := ret[0].(error)
   191  	return ret0
   192  }
   193  
   194  // GetContainerLogs indicates an expected call of GetContainerLogs.
   195  func (mr *MockRuntimeMockRecorder) GetContainerLogs(ctx, pod, containerID, logOptions, stdout, stderr interface{}) *gomock.Call {
   196  	mr.mock.ctrl.T.Helper()
   197  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerLogs", reflect.TypeOf((*MockRuntime)(nil).GetContainerLogs), ctx, pod, containerID, logOptions, stdout, stderr)
   198  }
   199  
   200  // GetImageRef mocks base method.
   201  func (m *MockRuntime) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error) {
   202  	m.ctrl.T.Helper()
   203  	ret := m.ctrl.Call(m, "GetImageRef", ctx, image)
   204  	ret0, _ := ret[0].(string)
   205  	ret1, _ := ret[1].(error)
   206  	return ret0, ret1
   207  }
   208  
   209  // GetImageRef indicates an expected call of GetImageRef.
   210  func (mr *MockRuntimeMockRecorder) GetImageRef(ctx, image interface{}) *gomock.Call {
   211  	mr.mock.ctrl.T.Helper()
   212  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockRuntime)(nil).GetImageRef), ctx, image)
   213  }
   214  
   215  // GetImageSize mocks base method.
   216  func (m *MockRuntime) GetImageSize(ctx context.Context, image container.ImageSpec) (uint64, error) {
   217  	m.ctrl.T.Helper()
   218  	ret := m.ctrl.Call(m, "GetImageSize", ctx, image)
   219  	ret0, _ := ret[0].(uint64)
   220  	ret1, _ := ret[1].(error)
   221  	return ret0, ret1
   222  }
   223  
   224  // GetImageSize indicates an expected call of GetImageSize.
   225  func (mr *MockRuntimeMockRecorder) GetImageSize(ctx, image interface{}) *gomock.Call {
   226  	mr.mock.ctrl.T.Helper()
   227  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageSize", reflect.TypeOf((*MockRuntime)(nil).GetImageSize), ctx, image)
   228  }
   229  
   230  // GetPodStatus mocks base method.
   231  func (m *MockRuntime) GetPodStatus(ctx context.Context, uid types.UID, name, namespace string) (*container.PodStatus, error) {
   232  	m.ctrl.T.Helper()
   233  	ret := m.ctrl.Call(m, "GetPodStatus", ctx, uid, name, namespace)
   234  	ret0, _ := ret[0].(*container.PodStatus)
   235  	ret1, _ := ret[1].(error)
   236  	return ret0, ret1
   237  }
   238  
   239  // GetPodStatus indicates an expected call of GetPodStatus.
   240  func (mr *MockRuntimeMockRecorder) GetPodStatus(ctx, uid, name, namespace interface{}) *gomock.Call {
   241  	mr.mock.ctrl.T.Helper()
   242  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodStatus", reflect.TypeOf((*MockRuntime)(nil).GetPodStatus), ctx, uid, name, namespace)
   243  }
   244  
   245  // GetPods mocks base method.
   246  func (m *MockRuntime) GetPods(ctx context.Context, all bool) ([]*container.Pod, error) {
   247  	m.ctrl.T.Helper()
   248  	ret := m.ctrl.Call(m, "GetPods", ctx, all)
   249  	ret0, _ := ret[0].([]*container.Pod)
   250  	ret1, _ := ret[1].(error)
   251  	return ret0, ret1
   252  }
   253  
   254  // GetPods indicates an expected call of GetPods.
   255  func (mr *MockRuntimeMockRecorder) GetPods(ctx, all interface{}) *gomock.Call {
   256  	mr.mock.ctrl.T.Helper()
   257  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockRuntime)(nil).GetPods), ctx, all)
   258  }
   259  
   260  // ImageFsInfo mocks base method.
   261  func (m *MockRuntime) ImageFsInfo(ctx context.Context) (*v10.ImageFsInfoResponse, error) {
   262  	m.ctrl.T.Helper()
   263  	ret := m.ctrl.Call(m, "ImageFsInfo", ctx)
   264  	ret0, _ := ret[0].(*v10.ImageFsInfoResponse)
   265  	ret1, _ := ret[1].(error)
   266  	return ret0, ret1
   267  }
   268  
   269  // ImageFsInfo indicates an expected call of ImageFsInfo.
   270  func (mr *MockRuntimeMockRecorder) ImageFsInfo(ctx interface{}) *gomock.Call {
   271  	mr.mock.ctrl.T.Helper()
   272  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageFsInfo", reflect.TypeOf((*MockRuntime)(nil).ImageFsInfo), ctx)
   273  }
   274  
   275  // ImageStats mocks base method.
   276  func (m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error) {
   277  	m.ctrl.T.Helper()
   278  	ret := m.ctrl.Call(m, "ImageStats", ctx)
   279  	ret0, _ := ret[0].(*container.ImageStats)
   280  	ret1, _ := ret[1].(error)
   281  	return ret0, ret1
   282  }
   283  
   284  // ImageStats indicates an expected call of ImageStats.
   285  func (mr *MockRuntimeMockRecorder) ImageStats(ctx interface{}) *gomock.Call {
   286  	mr.mock.ctrl.T.Helper()
   287  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockRuntime)(nil).ImageStats), ctx)
   288  }
   289  
   290  // KillPod mocks base method.
   291  func (m *MockRuntime) KillPod(ctx context.Context, pod *v1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error {
   292  	m.ctrl.T.Helper()
   293  	ret := m.ctrl.Call(m, "KillPod", ctx, pod, runningPod, gracePeriodOverride)
   294  	ret0, _ := ret[0].(error)
   295  	return ret0
   296  }
   297  
   298  // KillPod indicates an expected call of KillPod.
   299  func (mr *MockRuntimeMockRecorder) KillPod(ctx, pod, runningPod, gracePeriodOverride interface{}) *gomock.Call {
   300  	mr.mock.ctrl.T.Helper()
   301  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KillPod", reflect.TypeOf((*MockRuntime)(nil).KillPod), ctx, pod, runningPod, gracePeriodOverride)
   302  }
   303  
   304  // ListImages mocks base method.
   305  func (m *MockRuntime) ListImages(ctx context.Context) ([]container.Image, error) {
   306  	m.ctrl.T.Helper()
   307  	ret := m.ctrl.Call(m, "ListImages", ctx)
   308  	ret0, _ := ret[0].([]container.Image)
   309  	ret1, _ := ret[1].(error)
   310  	return ret0, ret1
   311  }
   312  
   313  // ListImages indicates an expected call of ListImages.
   314  func (mr *MockRuntimeMockRecorder) ListImages(ctx interface{}) *gomock.Call {
   315  	mr.mock.ctrl.T.Helper()
   316  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockRuntime)(nil).ListImages), ctx)
   317  }
   318  
   319  // ListMetricDescriptors mocks base method.
   320  func (m *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v10.MetricDescriptor, error) {
   321  	m.ctrl.T.Helper()
   322  	ret := m.ctrl.Call(m, "ListMetricDescriptors", ctx)
   323  	ret0, _ := ret[0].([]*v10.MetricDescriptor)
   324  	ret1, _ := ret[1].(error)
   325  	return ret0, ret1
   326  }
   327  
   328  // ListMetricDescriptors indicates an expected call of ListMetricDescriptors.
   329  func (mr *MockRuntimeMockRecorder) ListMetricDescriptors(ctx interface{}) *gomock.Call {
   330  	mr.mock.ctrl.T.Helper()
   331  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMetricDescriptors", reflect.TypeOf((*MockRuntime)(nil).ListMetricDescriptors), ctx)
   332  }
   333  
   334  // ListPodSandboxMetrics mocks base method.
   335  func (m *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v10.PodSandboxMetrics, error) {
   336  	m.ctrl.T.Helper()
   337  	ret := m.ctrl.Call(m, "ListPodSandboxMetrics", ctx)
   338  	ret0, _ := ret[0].([]*v10.PodSandboxMetrics)
   339  	ret1, _ := ret[1].(error)
   340  	return ret0, ret1
   341  }
   342  
   343  // ListPodSandboxMetrics indicates an expected call of ListPodSandboxMetrics.
   344  func (mr *MockRuntimeMockRecorder) ListPodSandboxMetrics(ctx interface{}) *gomock.Call {
   345  	mr.mock.ctrl.T.Helper()
   346  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPodSandboxMetrics", reflect.TypeOf((*MockRuntime)(nil).ListPodSandboxMetrics), ctx)
   347  }
   348  
   349  // PullImage mocks base method.
   350  func (m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) {
   351  	m.ctrl.T.Helper()
   352  	ret := m.ctrl.Call(m, "PullImage", ctx, image, pullSecrets, podSandboxConfig)
   353  	ret0, _ := ret[0].(string)
   354  	ret1, _ := ret[1].(error)
   355  	return ret0, ret1
   356  }
   357  
   358  // PullImage indicates an expected call of PullImage.
   359  func (mr *MockRuntimeMockRecorder) PullImage(ctx, image, pullSecrets, podSandboxConfig interface{}) *gomock.Call {
   360  	mr.mock.ctrl.T.Helper()
   361  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockRuntime)(nil).PullImage), ctx, image, pullSecrets, podSandboxConfig)
   362  }
   363  
   364  // RemoveImage mocks base method.
   365  func (m *MockRuntime) RemoveImage(ctx context.Context, image container.ImageSpec) error {
   366  	m.ctrl.T.Helper()
   367  	ret := m.ctrl.Call(m, "RemoveImage", ctx, image)
   368  	ret0, _ := ret[0].(error)
   369  	return ret0
   370  }
   371  
   372  // RemoveImage indicates an expected call of RemoveImage.
   373  func (mr *MockRuntimeMockRecorder) RemoveImage(ctx, image interface{}) *gomock.Call {
   374  	mr.mock.ctrl.T.Helper()
   375  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockRuntime)(nil).RemoveImage), ctx, image)
   376  }
   377  
   378  // Status mocks base method.
   379  func (m *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error) {
   380  	m.ctrl.T.Helper()
   381  	ret := m.ctrl.Call(m, "Status", ctx)
   382  	ret0, _ := ret[0].(*container.RuntimeStatus)
   383  	ret1, _ := ret[1].(error)
   384  	return ret0, ret1
   385  }
   386  
   387  // Status indicates an expected call of Status.
   388  func (mr *MockRuntimeMockRecorder) Status(ctx interface{}) *gomock.Call {
   389  	mr.mock.ctrl.T.Helper()
   390  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRuntime)(nil).Status), ctx)
   391  }
   392  
   393  // SyncPod mocks base method.
   394  func (m *MockRuntime) SyncPod(ctx context.Context, pod *v1.Pod, podStatus *container.PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult {
   395  	m.ctrl.T.Helper()
   396  	ret := m.ctrl.Call(m, "SyncPod", ctx, pod, podStatus, pullSecrets, backOff)
   397  	ret0, _ := ret[0].(container.PodSyncResult)
   398  	return ret0
   399  }
   400  
   401  // SyncPod indicates an expected call of SyncPod.
   402  func (mr *MockRuntimeMockRecorder) SyncPod(ctx, pod, podStatus, pullSecrets, backOff interface{}) *gomock.Call {
   403  	mr.mock.ctrl.T.Helper()
   404  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPod", reflect.TypeOf((*MockRuntime)(nil).SyncPod), ctx, pod, podStatus, pullSecrets, backOff)
   405  }
   406  
   407  // Type mocks base method.
   408  func (m *MockRuntime) Type() string {
   409  	m.ctrl.T.Helper()
   410  	ret := m.ctrl.Call(m, "Type")
   411  	ret0, _ := ret[0].(string)
   412  	return ret0
   413  }
   414  
   415  // Type indicates an expected call of Type.
   416  func (mr *MockRuntimeMockRecorder) Type() *gomock.Call {
   417  	mr.mock.ctrl.T.Helper()
   418  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockRuntime)(nil).Type))
   419  }
   420  
   421  // UpdatePodCIDR mocks base method.
   422  func (m *MockRuntime) UpdatePodCIDR(ctx context.Context, podCIDR string) error {
   423  	m.ctrl.T.Helper()
   424  	ret := m.ctrl.Call(m, "UpdatePodCIDR", ctx, podCIDR)
   425  	ret0, _ := ret[0].(error)
   426  	return ret0
   427  }
   428  
   429  // UpdatePodCIDR indicates an expected call of UpdatePodCIDR.
   430  func (mr *MockRuntimeMockRecorder) UpdatePodCIDR(ctx, podCIDR interface{}) *gomock.Call {
   431  	mr.mock.ctrl.T.Helper()
   432  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePodCIDR", reflect.TypeOf((*MockRuntime)(nil).UpdatePodCIDR), ctx, podCIDR)
   433  }
   434  
   435  // Version mocks base method.
   436  func (m *MockRuntime) Version(ctx context.Context) (container.Version, error) {
   437  	m.ctrl.T.Helper()
   438  	ret := m.ctrl.Call(m, "Version", ctx)
   439  	ret0, _ := ret[0].(container.Version)
   440  	ret1, _ := ret[1].(error)
   441  	return ret0, ret1
   442  }
   443  
   444  // Version indicates an expected call of Version.
   445  func (mr *MockRuntimeMockRecorder) Version(ctx interface{}) *gomock.Call {
   446  	mr.mock.ctrl.T.Helper()
   447  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockRuntime)(nil).Version), ctx)
   448  }
   449  
   450  // MockStreamingRuntime is a mock of StreamingRuntime interface.
   451  type MockStreamingRuntime struct {
   452  	ctrl     *gomock.Controller
   453  	recorder *MockStreamingRuntimeMockRecorder
   454  }
   455  
   456  // MockStreamingRuntimeMockRecorder is the mock recorder for MockStreamingRuntime.
   457  type MockStreamingRuntimeMockRecorder struct {
   458  	mock *MockStreamingRuntime
   459  }
   460  
   461  // NewMockStreamingRuntime creates a new mock instance.
   462  func NewMockStreamingRuntime(ctrl *gomock.Controller) *MockStreamingRuntime {
   463  	mock := &MockStreamingRuntime{ctrl: ctrl}
   464  	mock.recorder = &MockStreamingRuntimeMockRecorder{mock}
   465  	return mock
   466  }
   467  
   468  // EXPECT returns an object that allows the caller to indicate expected use.
   469  func (m *MockStreamingRuntime) EXPECT() *MockStreamingRuntimeMockRecorder {
   470  	return m.recorder
   471  }
   472  
   473  // GetAttach mocks base method.
   474  func (m *MockStreamingRuntime) GetAttach(ctx context.Context, id container.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error) {
   475  	m.ctrl.T.Helper()
   476  	ret := m.ctrl.Call(m, "GetAttach", ctx, id, stdin, stdout, stderr, tty)
   477  	ret0, _ := ret[0].(*url.URL)
   478  	ret1, _ := ret[1].(error)
   479  	return ret0, ret1
   480  }
   481  
   482  // GetAttach indicates an expected call of GetAttach.
   483  func (mr *MockStreamingRuntimeMockRecorder) GetAttach(ctx, id, stdin, stdout, stderr, tty interface{}) *gomock.Call {
   484  	mr.mock.ctrl.T.Helper()
   485  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttach", reflect.TypeOf((*MockStreamingRuntime)(nil).GetAttach), ctx, id, stdin, stdout, stderr, tty)
   486  }
   487  
   488  // GetExec mocks base method.
   489  func (m *MockStreamingRuntime) GetExec(ctx context.Context, id container.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error) {
   490  	m.ctrl.T.Helper()
   491  	ret := m.ctrl.Call(m, "GetExec", ctx, id, cmd, stdin, stdout, stderr, tty)
   492  	ret0, _ := ret[0].(*url.URL)
   493  	ret1, _ := ret[1].(error)
   494  	return ret0, ret1
   495  }
   496  
   497  // GetExec indicates an expected call of GetExec.
   498  func (mr *MockStreamingRuntimeMockRecorder) GetExec(ctx, id, cmd, stdin, stdout, stderr, tty interface{}) *gomock.Call {
   499  	mr.mock.ctrl.T.Helper()
   500  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExec", reflect.TypeOf((*MockStreamingRuntime)(nil).GetExec), ctx, id, cmd, stdin, stdout, stderr, tty)
   501  }
   502  
   503  // GetPortForward mocks base method.
   504  func (m *MockStreamingRuntime) GetPortForward(ctx context.Context, podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error) {
   505  	m.ctrl.T.Helper()
   506  	ret := m.ctrl.Call(m, "GetPortForward", ctx, podName, podNamespace, podUID, ports)
   507  	ret0, _ := ret[0].(*url.URL)
   508  	ret1, _ := ret[1].(error)
   509  	return ret0, ret1
   510  }
   511  
   512  // GetPortForward indicates an expected call of GetPortForward.
   513  func (mr *MockStreamingRuntimeMockRecorder) GetPortForward(ctx, podName, podNamespace, podUID, ports interface{}) *gomock.Call {
   514  	mr.mock.ctrl.T.Helper()
   515  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPortForward", reflect.TypeOf((*MockStreamingRuntime)(nil).GetPortForward), ctx, podName, podNamespace, podUID, ports)
   516  }
   517  
   518  // MockImageService is a mock of ImageService interface.
   519  type MockImageService struct {
   520  	ctrl     *gomock.Controller
   521  	recorder *MockImageServiceMockRecorder
   522  }
   523  
   524  // MockImageServiceMockRecorder is the mock recorder for MockImageService.
   525  type MockImageServiceMockRecorder struct {
   526  	mock *MockImageService
   527  }
   528  
   529  // NewMockImageService creates a new mock instance.
   530  func NewMockImageService(ctrl *gomock.Controller) *MockImageService {
   531  	mock := &MockImageService{ctrl: ctrl}
   532  	mock.recorder = &MockImageServiceMockRecorder{mock}
   533  	return mock
   534  }
   535  
   536  // EXPECT returns an object that allows the caller to indicate expected use.
   537  func (m *MockImageService) EXPECT() *MockImageServiceMockRecorder {
   538  	return m.recorder
   539  }
   540  
   541  // GetImageRef mocks base method.
   542  func (m *MockImageService) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error) {
   543  	m.ctrl.T.Helper()
   544  	ret := m.ctrl.Call(m, "GetImageRef", ctx, image)
   545  	ret0, _ := ret[0].(string)
   546  	ret1, _ := ret[1].(error)
   547  	return ret0, ret1
   548  }
   549  
   550  // GetImageRef indicates an expected call of GetImageRef.
   551  func (mr *MockImageServiceMockRecorder) GetImageRef(ctx, image interface{}) *gomock.Call {
   552  	mr.mock.ctrl.T.Helper()
   553  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockImageService)(nil).GetImageRef), ctx, image)
   554  }
   555  
   556  // GetImageSize mocks base method.
   557  func (m *MockImageService) GetImageSize(ctx context.Context, image container.ImageSpec) (uint64, error) {
   558  	m.ctrl.T.Helper()
   559  	ret := m.ctrl.Call(m, "GetImageSize", ctx, image)
   560  	ret0, _ := ret[0].(uint64)
   561  	ret1, _ := ret[1].(error)
   562  	return ret0, ret1
   563  }
   564  
   565  // GetImageSize indicates an expected call of GetImageSize.
   566  func (mr *MockImageServiceMockRecorder) GetImageSize(ctx, image interface{}) *gomock.Call {
   567  	mr.mock.ctrl.T.Helper()
   568  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageSize", reflect.TypeOf((*MockImageService)(nil).GetImageSize), ctx, image)
   569  }
   570  
   571  // ImageFsInfo mocks base method.
   572  func (m *MockImageService) ImageFsInfo(ctx context.Context) (*v10.ImageFsInfoResponse, error) {
   573  	m.ctrl.T.Helper()
   574  	ret := m.ctrl.Call(m, "ImageFsInfo", ctx)
   575  	ret0, _ := ret[0].(*v10.ImageFsInfoResponse)
   576  	ret1, _ := ret[1].(error)
   577  	return ret0, ret1
   578  }
   579  
   580  // ImageFsInfo indicates an expected call of ImageFsInfo.
   581  func (mr *MockImageServiceMockRecorder) ImageFsInfo(ctx interface{}) *gomock.Call {
   582  	mr.mock.ctrl.T.Helper()
   583  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageFsInfo", reflect.TypeOf((*MockImageService)(nil).ImageFsInfo), ctx)
   584  }
   585  
   586  // ImageStats mocks base method.
   587  func (m *MockImageService) ImageStats(ctx context.Context) (*container.ImageStats, error) {
   588  	m.ctrl.T.Helper()
   589  	ret := m.ctrl.Call(m, "ImageStats", ctx)
   590  	ret0, _ := ret[0].(*container.ImageStats)
   591  	ret1, _ := ret[1].(error)
   592  	return ret0, ret1
   593  }
   594  
   595  // ImageStats indicates an expected call of ImageStats.
   596  func (mr *MockImageServiceMockRecorder) ImageStats(ctx interface{}) *gomock.Call {
   597  	mr.mock.ctrl.T.Helper()
   598  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockImageService)(nil).ImageStats), ctx)
   599  }
   600  
   601  // ListImages mocks base method.
   602  func (m *MockImageService) ListImages(ctx context.Context) ([]container.Image, error) {
   603  	m.ctrl.T.Helper()
   604  	ret := m.ctrl.Call(m, "ListImages", ctx)
   605  	ret0, _ := ret[0].([]container.Image)
   606  	ret1, _ := ret[1].(error)
   607  	return ret0, ret1
   608  }
   609  
   610  // ListImages indicates an expected call of ListImages.
   611  func (mr *MockImageServiceMockRecorder) ListImages(ctx interface{}) *gomock.Call {
   612  	mr.mock.ctrl.T.Helper()
   613  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockImageService)(nil).ListImages), ctx)
   614  }
   615  
   616  // PullImage mocks base method.
   617  func (m *MockImageService) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) {
   618  	m.ctrl.T.Helper()
   619  	ret := m.ctrl.Call(m, "PullImage", ctx, image, pullSecrets, podSandboxConfig)
   620  	ret0, _ := ret[0].(string)
   621  	ret1, _ := ret[1].(error)
   622  	return ret0, ret1
   623  }
   624  
   625  // PullImage indicates an expected call of PullImage.
   626  func (mr *MockImageServiceMockRecorder) PullImage(ctx, image, pullSecrets, podSandboxConfig interface{}) *gomock.Call {
   627  	mr.mock.ctrl.T.Helper()
   628  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockImageService)(nil).PullImage), ctx, image, pullSecrets, podSandboxConfig)
   629  }
   630  
   631  // RemoveImage mocks base method.
   632  func (m *MockImageService) RemoveImage(ctx context.Context, image container.ImageSpec) error {
   633  	m.ctrl.T.Helper()
   634  	ret := m.ctrl.Call(m, "RemoveImage", ctx, image)
   635  	ret0, _ := ret[0].(error)
   636  	return ret0
   637  }
   638  
   639  // RemoveImage indicates an expected call of RemoveImage.
   640  func (mr *MockImageServiceMockRecorder) RemoveImage(ctx, image interface{}) *gomock.Call {
   641  	mr.mock.ctrl.T.Helper()
   642  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockImageService)(nil).RemoveImage), ctx, image)
   643  }
   644  
   645  // MockAttacher is a mock of Attacher interface.
   646  type MockAttacher struct {
   647  	ctrl     *gomock.Controller
   648  	recorder *MockAttacherMockRecorder
   649  }
   650  
   651  // MockAttacherMockRecorder is the mock recorder for MockAttacher.
   652  type MockAttacherMockRecorder struct {
   653  	mock *MockAttacher
   654  }
   655  
   656  // NewMockAttacher creates a new mock instance.
   657  func NewMockAttacher(ctrl *gomock.Controller) *MockAttacher {
   658  	mock := &MockAttacher{ctrl: ctrl}
   659  	mock.recorder = &MockAttacherMockRecorder{mock}
   660  	return mock
   661  }
   662  
   663  // EXPECT returns an object that allows the caller to indicate expected use.
   664  func (m *MockAttacher) EXPECT() *MockAttacherMockRecorder {
   665  	return m.recorder
   666  }
   667  
   668  // AttachContainer mocks base method.
   669  func (m *MockAttacher) AttachContainer(ctx context.Context, id container.ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {
   670  	m.ctrl.T.Helper()
   671  	ret := m.ctrl.Call(m, "AttachContainer", ctx, id, stdin, stdout, stderr, tty, resize)
   672  	ret0, _ := ret[0].(error)
   673  	return ret0
   674  }
   675  
   676  // AttachContainer indicates an expected call of AttachContainer.
   677  func (mr *MockAttacherMockRecorder) AttachContainer(ctx, id, stdin, stdout, stderr, tty, resize interface{}) *gomock.Call {
   678  	mr.mock.ctrl.T.Helper()
   679  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachContainer", reflect.TypeOf((*MockAttacher)(nil).AttachContainer), ctx, id, stdin, stdout, stderr, tty, resize)
   680  }
   681  
   682  // MockCommandRunner is a mock of CommandRunner interface.
   683  type MockCommandRunner struct {
   684  	ctrl     *gomock.Controller
   685  	recorder *MockCommandRunnerMockRecorder
   686  }
   687  
   688  // MockCommandRunnerMockRecorder is the mock recorder for MockCommandRunner.
   689  type MockCommandRunnerMockRecorder struct {
   690  	mock *MockCommandRunner
   691  }
   692  
   693  // NewMockCommandRunner creates a new mock instance.
   694  func NewMockCommandRunner(ctrl *gomock.Controller) *MockCommandRunner {
   695  	mock := &MockCommandRunner{ctrl: ctrl}
   696  	mock.recorder = &MockCommandRunnerMockRecorder{mock}
   697  	return mock
   698  }
   699  
   700  // EXPECT returns an object that allows the caller to indicate expected use.
   701  func (m *MockCommandRunner) EXPECT() *MockCommandRunnerMockRecorder {
   702  	return m.recorder
   703  }
   704  
   705  // RunInContainer mocks base method.
   706  func (m *MockCommandRunner) RunInContainer(ctx context.Context, id container.ContainerID, cmd []string, timeout time.Duration) ([]byte, error) {
   707  	m.ctrl.T.Helper()
   708  	ret := m.ctrl.Call(m, "RunInContainer", ctx, id, cmd, timeout)
   709  	ret0, _ := ret[0].([]byte)
   710  	ret1, _ := ret[1].(error)
   711  	return ret0, ret1
   712  }
   713  
   714  // RunInContainer indicates an expected call of RunInContainer.
   715  func (mr *MockCommandRunnerMockRecorder) RunInContainer(ctx, id, cmd, timeout interface{}) *gomock.Call {
   716  	mr.mock.ctrl.T.Helper()
   717  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunInContainer", reflect.TypeOf((*MockCommandRunner)(nil).RunInContainer), ctx, id, cmd, timeout)
   718  }
   719  

View as plain text