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