k8s.io/kubernetes@v1.29.3/pkg/kubelet/container/testing/runtime_mock.go (about) 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 // GetPodStatus mocks base method. 216 func (m *MockRuntime) GetPodStatus(ctx context.Context, uid types.UID, name, namespace string) (*container.PodStatus, error) { 217 m.ctrl.T.Helper() 218 ret := m.ctrl.Call(m, "GetPodStatus", ctx, uid, name, namespace) 219 ret0, _ := ret[0].(*container.PodStatus) 220 ret1, _ := ret[1].(error) 221 return ret0, ret1 222 } 223 224 // GetPodStatus indicates an expected call of GetPodStatus. 225 func (mr *MockRuntimeMockRecorder) GetPodStatus(ctx, uid, name, namespace interface{}) *gomock.Call { 226 mr.mock.ctrl.T.Helper() 227 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodStatus", reflect.TypeOf((*MockRuntime)(nil).GetPodStatus), ctx, uid, name, namespace) 228 } 229 230 // GetPods mocks base method. 231 func (m *MockRuntime) GetPods(ctx context.Context, all bool) ([]*container.Pod, error) { 232 m.ctrl.T.Helper() 233 ret := m.ctrl.Call(m, "GetPods", ctx, all) 234 ret0, _ := ret[0].([]*container.Pod) 235 ret1, _ := ret[1].(error) 236 return ret0, ret1 237 } 238 239 // GetPods indicates an expected call of GetPods. 240 func (mr *MockRuntimeMockRecorder) GetPods(ctx, all interface{}) *gomock.Call { 241 mr.mock.ctrl.T.Helper() 242 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockRuntime)(nil).GetPods), ctx, all) 243 } 244 245 // ImageFsInfo mocks base method. 246 func (m *MockRuntime) ImageFsInfo(ctx context.Context) (*v10.ImageFsInfoResponse, error) { 247 m.ctrl.T.Helper() 248 ret := m.ctrl.Call(m, "ImageFsInfo", ctx) 249 ret0, _ := ret[0].(*v10.ImageFsInfoResponse) 250 ret1, _ := ret[1].(error) 251 return ret0, ret1 252 } 253 254 // ImageFsInfo indicates an expected call of ImageFsInfo. 255 func (mr *MockRuntimeMockRecorder) ImageFsInfo(ctx interface{}) *gomock.Call { 256 mr.mock.ctrl.T.Helper() 257 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageFsInfo", reflect.TypeOf((*MockRuntime)(nil).ImageFsInfo), ctx) 258 } 259 260 // ImageStats mocks base method. 261 func (m *MockRuntime) ImageStats(ctx context.Context) (*container.ImageStats, error) { 262 m.ctrl.T.Helper() 263 ret := m.ctrl.Call(m, "ImageStats", ctx) 264 ret0, _ := ret[0].(*container.ImageStats) 265 ret1, _ := ret[1].(error) 266 return ret0, ret1 267 } 268 269 // ImageStats indicates an expected call of ImageStats. 270 func (mr *MockRuntimeMockRecorder) ImageStats(ctx interface{}) *gomock.Call { 271 mr.mock.ctrl.T.Helper() 272 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockRuntime)(nil).ImageStats), ctx) 273 } 274 275 // KillPod mocks base method. 276 func (m *MockRuntime) KillPod(ctx context.Context, pod *v1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error { 277 m.ctrl.T.Helper() 278 ret := m.ctrl.Call(m, "KillPod", ctx, pod, runningPod, gracePeriodOverride) 279 ret0, _ := ret[0].(error) 280 return ret0 281 } 282 283 // KillPod indicates an expected call of KillPod. 284 func (mr *MockRuntimeMockRecorder) KillPod(ctx, pod, runningPod, gracePeriodOverride interface{}) *gomock.Call { 285 mr.mock.ctrl.T.Helper() 286 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KillPod", reflect.TypeOf((*MockRuntime)(nil).KillPod), ctx, pod, runningPod, gracePeriodOverride) 287 } 288 289 // ListImages mocks base method. 290 func (m *MockRuntime) ListImages(ctx context.Context) ([]container.Image, error) { 291 m.ctrl.T.Helper() 292 ret := m.ctrl.Call(m, "ListImages", ctx) 293 ret0, _ := ret[0].([]container.Image) 294 ret1, _ := ret[1].(error) 295 return ret0, ret1 296 } 297 298 // ListImages indicates an expected call of ListImages. 299 func (mr *MockRuntimeMockRecorder) ListImages(ctx interface{}) *gomock.Call { 300 mr.mock.ctrl.T.Helper() 301 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockRuntime)(nil).ListImages), ctx) 302 } 303 304 // ListMetricDescriptors mocks base method. 305 func (m *MockRuntime) ListMetricDescriptors(ctx context.Context) ([]*v10.MetricDescriptor, error) { 306 m.ctrl.T.Helper() 307 ret := m.ctrl.Call(m, "ListMetricDescriptors", ctx) 308 ret0, _ := ret[0].([]*v10.MetricDescriptor) 309 ret1, _ := ret[1].(error) 310 return ret0, ret1 311 } 312 313 // ListMetricDescriptors indicates an expected call of ListMetricDescriptors. 314 func (mr *MockRuntimeMockRecorder) ListMetricDescriptors(ctx interface{}) *gomock.Call { 315 mr.mock.ctrl.T.Helper() 316 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMetricDescriptors", reflect.TypeOf((*MockRuntime)(nil).ListMetricDescriptors), ctx) 317 } 318 319 // ListPodSandboxMetrics mocks base method. 320 func (m *MockRuntime) ListPodSandboxMetrics(ctx context.Context) ([]*v10.PodSandboxMetrics, error) { 321 m.ctrl.T.Helper() 322 ret := m.ctrl.Call(m, "ListPodSandboxMetrics", ctx) 323 ret0, _ := ret[0].([]*v10.PodSandboxMetrics) 324 ret1, _ := ret[1].(error) 325 return ret0, ret1 326 } 327 328 // ListPodSandboxMetrics indicates an expected call of ListPodSandboxMetrics. 329 func (mr *MockRuntimeMockRecorder) ListPodSandboxMetrics(ctx interface{}) *gomock.Call { 330 mr.mock.ctrl.T.Helper() 331 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPodSandboxMetrics", reflect.TypeOf((*MockRuntime)(nil).ListPodSandboxMetrics), ctx) 332 } 333 334 // PullImage mocks base method. 335 func (m *MockRuntime) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) { 336 m.ctrl.T.Helper() 337 ret := m.ctrl.Call(m, "PullImage", ctx, image, pullSecrets, podSandboxConfig) 338 ret0, _ := ret[0].(string) 339 ret1, _ := ret[1].(error) 340 return ret0, ret1 341 } 342 343 // PullImage indicates an expected call of PullImage. 344 func (mr *MockRuntimeMockRecorder) PullImage(ctx, image, pullSecrets, podSandboxConfig interface{}) *gomock.Call { 345 mr.mock.ctrl.T.Helper() 346 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockRuntime)(nil).PullImage), ctx, image, pullSecrets, podSandboxConfig) 347 } 348 349 // RemoveImage mocks base method. 350 func (m *MockRuntime) RemoveImage(ctx context.Context, image container.ImageSpec) error { 351 m.ctrl.T.Helper() 352 ret := m.ctrl.Call(m, "RemoveImage", ctx, image) 353 ret0, _ := ret[0].(error) 354 return ret0 355 } 356 357 // RemoveImage indicates an expected call of RemoveImage. 358 func (mr *MockRuntimeMockRecorder) RemoveImage(ctx, image interface{}) *gomock.Call { 359 mr.mock.ctrl.T.Helper() 360 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockRuntime)(nil).RemoveImage), ctx, image) 361 } 362 363 // Status mocks base method. 364 func (m *MockRuntime) Status(ctx context.Context) (*container.RuntimeStatus, error) { 365 m.ctrl.T.Helper() 366 ret := m.ctrl.Call(m, "Status", ctx) 367 ret0, _ := ret[0].(*container.RuntimeStatus) 368 ret1, _ := ret[1].(error) 369 return ret0, ret1 370 } 371 372 // Status indicates an expected call of Status. 373 func (mr *MockRuntimeMockRecorder) Status(ctx interface{}) *gomock.Call { 374 mr.mock.ctrl.T.Helper() 375 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRuntime)(nil).Status), ctx) 376 } 377 378 // SyncPod mocks base method. 379 func (m *MockRuntime) SyncPod(ctx context.Context, pod *v1.Pod, podStatus *container.PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult { 380 m.ctrl.T.Helper() 381 ret := m.ctrl.Call(m, "SyncPod", ctx, pod, podStatus, pullSecrets, backOff) 382 ret0, _ := ret[0].(container.PodSyncResult) 383 return ret0 384 } 385 386 // SyncPod indicates an expected call of SyncPod. 387 func (mr *MockRuntimeMockRecorder) SyncPod(ctx, pod, podStatus, pullSecrets, backOff interface{}) *gomock.Call { 388 mr.mock.ctrl.T.Helper() 389 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPod", reflect.TypeOf((*MockRuntime)(nil).SyncPod), ctx, pod, podStatus, pullSecrets, backOff) 390 } 391 392 // Type mocks base method. 393 func (m *MockRuntime) Type() string { 394 m.ctrl.T.Helper() 395 ret := m.ctrl.Call(m, "Type") 396 ret0, _ := ret[0].(string) 397 return ret0 398 } 399 400 // Type indicates an expected call of Type. 401 func (mr *MockRuntimeMockRecorder) Type() *gomock.Call { 402 mr.mock.ctrl.T.Helper() 403 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockRuntime)(nil).Type)) 404 } 405 406 // UpdatePodCIDR mocks base method. 407 func (m *MockRuntime) UpdatePodCIDR(ctx context.Context, podCIDR string) error { 408 m.ctrl.T.Helper() 409 ret := m.ctrl.Call(m, "UpdatePodCIDR", ctx, podCIDR) 410 ret0, _ := ret[0].(error) 411 return ret0 412 } 413 414 // UpdatePodCIDR indicates an expected call of UpdatePodCIDR. 415 func (mr *MockRuntimeMockRecorder) UpdatePodCIDR(ctx, podCIDR interface{}) *gomock.Call { 416 mr.mock.ctrl.T.Helper() 417 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePodCIDR", reflect.TypeOf((*MockRuntime)(nil).UpdatePodCIDR), ctx, podCIDR) 418 } 419 420 // Version mocks base method. 421 func (m *MockRuntime) Version(ctx context.Context) (container.Version, error) { 422 m.ctrl.T.Helper() 423 ret := m.ctrl.Call(m, "Version", ctx) 424 ret0, _ := ret[0].(container.Version) 425 ret1, _ := ret[1].(error) 426 return ret0, ret1 427 } 428 429 // Version indicates an expected call of Version. 430 func (mr *MockRuntimeMockRecorder) Version(ctx interface{}) *gomock.Call { 431 mr.mock.ctrl.T.Helper() 432 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockRuntime)(nil).Version), ctx) 433 } 434 435 // MockStreamingRuntime is a mock of StreamingRuntime interface. 436 type MockStreamingRuntime struct { 437 ctrl *gomock.Controller 438 recorder *MockStreamingRuntimeMockRecorder 439 } 440 441 // MockStreamingRuntimeMockRecorder is the mock recorder for MockStreamingRuntime. 442 type MockStreamingRuntimeMockRecorder struct { 443 mock *MockStreamingRuntime 444 } 445 446 // NewMockStreamingRuntime creates a new mock instance. 447 func NewMockStreamingRuntime(ctrl *gomock.Controller) *MockStreamingRuntime { 448 mock := &MockStreamingRuntime{ctrl: ctrl} 449 mock.recorder = &MockStreamingRuntimeMockRecorder{mock} 450 return mock 451 } 452 453 // EXPECT returns an object that allows the caller to indicate expected use. 454 func (m *MockStreamingRuntime) EXPECT() *MockStreamingRuntimeMockRecorder { 455 return m.recorder 456 } 457 458 // GetAttach mocks base method. 459 func (m *MockStreamingRuntime) GetAttach(ctx context.Context, id container.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error) { 460 m.ctrl.T.Helper() 461 ret := m.ctrl.Call(m, "GetAttach", ctx, id, stdin, stdout, stderr, tty) 462 ret0, _ := ret[0].(*url.URL) 463 ret1, _ := ret[1].(error) 464 return ret0, ret1 465 } 466 467 // GetAttach indicates an expected call of GetAttach. 468 func (mr *MockStreamingRuntimeMockRecorder) GetAttach(ctx, id, stdin, stdout, stderr, tty interface{}) *gomock.Call { 469 mr.mock.ctrl.T.Helper() 470 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttach", reflect.TypeOf((*MockStreamingRuntime)(nil).GetAttach), ctx, id, stdin, stdout, stderr, tty) 471 } 472 473 // GetExec mocks base method. 474 func (m *MockStreamingRuntime) GetExec(ctx context.Context, id container.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error) { 475 m.ctrl.T.Helper() 476 ret := m.ctrl.Call(m, "GetExec", ctx, id, cmd, stdin, stdout, stderr, tty) 477 ret0, _ := ret[0].(*url.URL) 478 ret1, _ := ret[1].(error) 479 return ret0, ret1 480 } 481 482 // GetExec indicates an expected call of GetExec. 483 func (mr *MockStreamingRuntimeMockRecorder) GetExec(ctx, id, cmd, stdin, stdout, stderr, tty interface{}) *gomock.Call { 484 mr.mock.ctrl.T.Helper() 485 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExec", reflect.TypeOf((*MockStreamingRuntime)(nil).GetExec), ctx, id, cmd, stdin, stdout, stderr, tty) 486 } 487 488 // GetPortForward mocks base method. 489 func (m *MockStreamingRuntime) GetPortForward(ctx context.Context, podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error) { 490 m.ctrl.T.Helper() 491 ret := m.ctrl.Call(m, "GetPortForward", ctx, podName, podNamespace, podUID, ports) 492 ret0, _ := ret[0].(*url.URL) 493 ret1, _ := ret[1].(error) 494 return ret0, ret1 495 } 496 497 // GetPortForward indicates an expected call of GetPortForward. 498 func (mr *MockStreamingRuntimeMockRecorder) GetPortForward(ctx, podName, podNamespace, podUID, ports interface{}) *gomock.Call { 499 mr.mock.ctrl.T.Helper() 500 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPortForward", reflect.TypeOf((*MockStreamingRuntime)(nil).GetPortForward), ctx, podName, podNamespace, podUID, ports) 501 } 502 503 // MockImageService is a mock of ImageService interface. 504 type MockImageService struct { 505 ctrl *gomock.Controller 506 recorder *MockImageServiceMockRecorder 507 } 508 509 // MockImageServiceMockRecorder is the mock recorder for MockImageService. 510 type MockImageServiceMockRecorder struct { 511 mock *MockImageService 512 } 513 514 // NewMockImageService creates a new mock instance. 515 func NewMockImageService(ctrl *gomock.Controller) *MockImageService { 516 mock := &MockImageService{ctrl: ctrl} 517 mock.recorder = &MockImageServiceMockRecorder{mock} 518 return mock 519 } 520 521 // EXPECT returns an object that allows the caller to indicate expected use. 522 func (m *MockImageService) EXPECT() *MockImageServiceMockRecorder { 523 return m.recorder 524 } 525 526 // GetImageRef mocks base method. 527 func (m *MockImageService) GetImageRef(ctx context.Context, image container.ImageSpec) (string, error) { 528 m.ctrl.T.Helper() 529 ret := m.ctrl.Call(m, "GetImageRef", ctx, image) 530 ret0, _ := ret[0].(string) 531 ret1, _ := ret[1].(error) 532 return ret0, ret1 533 } 534 535 // GetImageRef indicates an expected call of GetImageRef. 536 func (mr *MockImageServiceMockRecorder) GetImageRef(ctx, image interface{}) *gomock.Call { 537 mr.mock.ctrl.T.Helper() 538 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockImageService)(nil).GetImageRef), ctx, image) 539 } 540 541 // ImageFsInfo mocks base method. 542 func (m *MockImageService) ImageFsInfo(ctx context.Context) (*v10.ImageFsInfoResponse, error) { 543 m.ctrl.T.Helper() 544 ret := m.ctrl.Call(m, "ImageFsInfo", ctx) 545 ret0, _ := ret[0].(*v10.ImageFsInfoResponse) 546 ret1, _ := ret[1].(error) 547 return ret0, ret1 548 } 549 550 // ImageFsInfo indicates an expected call of ImageFsInfo. 551 func (mr *MockImageServiceMockRecorder) ImageFsInfo(ctx interface{}) *gomock.Call { 552 mr.mock.ctrl.T.Helper() 553 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageFsInfo", reflect.TypeOf((*MockImageService)(nil).ImageFsInfo), ctx) 554 } 555 556 // ImageStats mocks base method. 557 func (m *MockImageService) ImageStats(ctx context.Context) (*container.ImageStats, error) { 558 m.ctrl.T.Helper() 559 ret := m.ctrl.Call(m, "ImageStats", ctx) 560 ret0, _ := ret[0].(*container.ImageStats) 561 ret1, _ := ret[1].(error) 562 return ret0, ret1 563 } 564 565 // ImageStats indicates an expected call of ImageStats. 566 func (mr *MockImageServiceMockRecorder) ImageStats(ctx interface{}) *gomock.Call { 567 mr.mock.ctrl.T.Helper() 568 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockImageService)(nil).ImageStats), ctx) 569 } 570 571 // ListImages mocks base method. 572 func (m *MockImageService) ListImages(ctx context.Context) ([]container.Image, error) { 573 m.ctrl.T.Helper() 574 ret := m.ctrl.Call(m, "ListImages", ctx) 575 ret0, _ := ret[0].([]container.Image) 576 ret1, _ := ret[1].(error) 577 return ret0, ret1 578 } 579 580 // ListImages indicates an expected call of ListImages. 581 func (mr *MockImageServiceMockRecorder) ListImages(ctx interface{}) *gomock.Call { 582 mr.mock.ctrl.T.Helper() 583 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockImageService)(nil).ListImages), ctx) 584 } 585 586 // PullImage mocks base method. 587 func (m *MockImageService) PullImage(ctx context.Context, image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) { 588 m.ctrl.T.Helper() 589 ret := m.ctrl.Call(m, "PullImage", ctx, image, pullSecrets, podSandboxConfig) 590 ret0, _ := ret[0].(string) 591 ret1, _ := ret[1].(error) 592 return ret0, ret1 593 } 594 595 // PullImage indicates an expected call of PullImage. 596 func (mr *MockImageServiceMockRecorder) PullImage(ctx, image, pullSecrets, podSandboxConfig interface{}) *gomock.Call { 597 mr.mock.ctrl.T.Helper() 598 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockImageService)(nil).PullImage), ctx, image, pullSecrets, podSandboxConfig) 599 } 600 601 // RemoveImage mocks base method. 602 func (m *MockImageService) RemoveImage(ctx context.Context, image container.ImageSpec) error { 603 m.ctrl.T.Helper() 604 ret := m.ctrl.Call(m, "RemoveImage", ctx, image) 605 ret0, _ := ret[0].(error) 606 return ret0 607 } 608 609 // RemoveImage indicates an expected call of RemoveImage. 610 func (mr *MockImageServiceMockRecorder) RemoveImage(ctx, image interface{}) *gomock.Call { 611 mr.mock.ctrl.T.Helper() 612 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockImageService)(nil).RemoveImage), ctx, image) 613 } 614 615 // MockAttacher is a mock of Attacher interface. 616 type MockAttacher struct { 617 ctrl *gomock.Controller 618 recorder *MockAttacherMockRecorder 619 } 620 621 // MockAttacherMockRecorder is the mock recorder for MockAttacher. 622 type MockAttacherMockRecorder struct { 623 mock *MockAttacher 624 } 625 626 // NewMockAttacher creates a new mock instance. 627 func NewMockAttacher(ctrl *gomock.Controller) *MockAttacher { 628 mock := &MockAttacher{ctrl: ctrl} 629 mock.recorder = &MockAttacherMockRecorder{mock} 630 return mock 631 } 632 633 // EXPECT returns an object that allows the caller to indicate expected use. 634 func (m *MockAttacher) EXPECT() *MockAttacherMockRecorder { 635 return m.recorder 636 } 637 638 // AttachContainer mocks base method. 639 func (m *MockAttacher) AttachContainer(ctx context.Context, id container.ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error { 640 m.ctrl.T.Helper() 641 ret := m.ctrl.Call(m, "AttachContainer", ctx, id, stdin, stdout, stderr, tty, resize) 642 ret0, _ := ret[0].(error) 643 return ret0 644 } 645 646 // AttachContainer indicates an expected call of AttachContainer. 647 func (mr *MockAttacherMockRecorder) AttachContainer(ctx, id, stdin, stdout, stderr, tty, resize interface{}) *gomock.Call { 648 mr.mock.ctrl.T.Helper() 649 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachContainer", reflect.TypeOf((*MockAttacher)(nil).AttachContainer), ctx, id, stdin, stdout, stderr, tty, resize) 650 } 651 652 // MockCommandRunner is a mock of CommandRunner interface. 653 type MockCommandRunner struct { 654 ctrl *gomock.Controller 655 recorder *MockCommandRunnerMockRecorder 656 } 657 658 // MockCommandRunnerMockRecorder is the mock recorder for MockCommandRunner. 659 type MockCommandRunnerMockRecorder struct { 660 mock *MockCommandRunner 661 } 662 663 // NewMockCommandRunner creates a new mock instance. 664 func NewMockCommandRunner(ctrl *gomock.Controller) *MockCommandRunner { 665 mock := &MockCommandRunner{ctrl: ctrl} 666 mock.recorder = &MockCommandRunnerMockRecorder{mock} 667 return mock 668 } 669 670 // EXPECT returns an object that allows the caller to indicate expected use. 671 func (m *MockCommandRunner) EXPECT() *MockCommandRunnerMockRecorder { 672 return m.recorder 673 } 674 675 // RunInContainer mocks base method. 676 func (m *MockCommandRunner) RunInContainer(ctx context.Context, id container.ContainerID, cmd []string, timeout time.Duration) ([]byte, error) { 677 m.ctrl.T.Helper() 678 ret := m.ctrl.Call(m, "RunInContainer", ctx, id, cmd, timeout) 679 ret0, _ := ret[0].([]byte) 680 ret1, _ := ret[1].(error) 681 return ret0, ret1 682 } 683 684 // RunInContainer indicates an expected call of RunInContainer. 685 func (mr *MockCommandRunnerMockRecorder) RunInContainer(ctx, id, cmd, timeout interface{}) *gomock.Call { 686 mr.mock.ctrl.T.Helper() 687 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunInContainer", reflect.TypeOf((*MockCommandRunner)(nil).RunInContainer), ctx, id, cmd, timeout) 688 }