k8s.io/kubernetes@v1.29.3/pkg/kubelet/container/testing/mock_runtime_cache.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_cache.go 19 20 // Package testing is a generated GoMock package. 21 package testing 22 23 import ( 24 context "context" 25 reflect "reflect" 26 time "time" 27 28 gomock "github.com/golang/mock/gomock" 29 container "k8s.io/kubernetes/pkg/kubelet/container" 30 ) 31 32 // MockRuntimeCache is a mock of RuntimeCache interface. 33 type MockRuntimeCache struct { 34 ctrl *gomock.Controller 35 recorder *MockRuntimeCacheMockRecorder 36 } 37 38 // MockRuntimeCacheMockRecorder is the mock recorder for MockRuntimeCache. 39 type MockRuntimeCacheMockRecorder struct { 40 mock *MockRuntimeCache 41 } 42 43 // NewMockRuntimeCache creates a new mock instance. 44 func NewMockRuntimeCache(ctrl *gomock.Controller) *MockRuntimeCache { 45 mock := &MockRuntimeCache{ctrl: ctrl} 46 mock.recorder = &MockRuntimeCacheMockRecorder{mock} 47 return mock 48 } 49 50 // EXPECT returns an object that allows the caller to indicate expected use. 51 func (m *MockRuntimeCache) EXPECT() *MockRuntimeCacheMockRecorder { 52 return m.recorder 53 } 54 55 // ForceUpdateIfOlder mocks base method. 56 func (m *MockRuntimeCache) ForceUpdateIfOlder(arg0 context.Context, arg1 time.Time) error { 57 m.ctrl.T.Helper() 58 ret := m.ctrl.Call(m, "ForceUpdateIfOlder", arg0, arg1) 59 ret0, _ := ret[0].(error) 60 return ret0 61 } 62 63 // ForceUpdateIfOlder indicates an expected call of ForceUpdateIfOlder. 64 func (mr *MockRuntimeCacheMockRecorder) ForceUpdateIfOlder(arg0, arg1 interface{}) *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceUpdateIfOlder", reflect.TypeOf((*MockRuntimeCache)(nil).ForceUpdateIfOlder), arg0, arg1) 67 } 68 69 // GetPods mocks base method. 70 func (m *MockRuntimeCache) GetPods(arg0 context.Context) ([]*container.Pod, error) { 71 m.ctrl.T.Helper() 72 ret := m.ctrl.Call(m, "GetPods", arg0) 73 ret0, _ := ret[0].([]*container.Pod) 74 ret1, _ := ret[1].(error) 75 return ret0, ret1 76 } 77 78 // GetPods indicates an expected call of GetPods. 79 func (mr *MockRuntimeCacheMockRecorder) GetPods(arg0 interface{}) *gomock.Call { 80 mr.mock.ctrl.T.Helper() 81 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockRuntimeCache)(nil).GetPods), arg0) 82 } 83 84 // MockpodsGetter is a mock of podsGetter interface. 85 type MockpodsGetter struct { 86 ctrl *gomock.Controller 87 recorder *MockpodsGetterMockRecorder 88 } 89 90 // MockpodsGetterMockRecorder is the mock recorder for MockpodsGetter. 91 type MockpodsGetterMockRecorder struct { 92 mock *MockpodsGetter 93 } 94 95 // NewMockpodsGetter creates a new mock instance. 96 func NewMockpodsGetter(ctrl *gomock.Controller) *MockpodsGetter { 97 mock := &MockpodsGetter{ctrl: ctrl} 98 mock.recorder = &MockpodsGetterMockRecorder{mock} 99 return mock 100 } 101 102 // EXPECT returns an object that allows the caller to indicate expected use. 103 func (m *MockpodsGetter) EXPECT() *MockpodsGetterMockRecorder { 104 return m.recorder 105 } 106 107 // GetPods mocks base method. 108 func (m *MockpodsGetter) GetPods(arg0 context.Context, arg1 bool) ([]*container.Pod, error) { 109 m.ctrl.T.Helper() 110 ret := m.ctrl.Call(m, "GetPods", arg0, arg1) 111 ret0, _ := ret[0].([]*container.Pod) 112 ret1, _ := ret[1].(error) 113 return ret0, ret1 114 } 115 116 // GetPods indicates an expected call of GetPods. 117 func (mr *MockpodsGetterMockRecorder) GetPods(arg0, arg1 interface{}) *gomock.Call { 118 mr.mock.ctrl.T.Helper() 119 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockpodsGetter)(nil).GetPods), arg0, arg1) 120 }