k8s.io/kubernetes@v1.29.3/pkg/kubelet/pod/testing/mock_manager.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: k8s.io/kubernetes/pkg/kubelet/pod (interfaces: Manager) 19 20 // Package testing is a generated GoMock package. 21 package testing 22 23 import ( 24 reflect "reflect" 25 26 gomock "github.com/golang/mock/gomock" 27 v1 "k8s.io/api/core/v1" 28 types "k8s.io/apimachinery/pkg/types" 29 types0 "k8s.io/kubernetes/pkg/kubelet/types" 30 ) 31 32 // MockManager is a mock of Manager interface. 33 type MockManager struct { 34 ctrl *gomock.Controller 35 recorder *MockManagerMockRecorder 36 } 37 38 // MockManagerMockRecorder is the mock recorder for MockManager. 39 type MockManagerMockRecorder struct { 40 mock *MockManager 41 } 42 43 // NewMockManager creates a new mock instance. 44 func NewMockManager(ctrl *gomock.Controller) *MockManager { 45 mock := &MockManager{ctrl: ctrl} 46 mock.recorder = &MockManagerMockRecorder{mock} 47 return mock 48 } 49 50 // EXPECT returns an object that allows the caller to indicate expected use. 51 func (m *MockManager) EXPECT() *MockManagerMockRecorder { 52 return m.recorder 53 } 54 55 // AddPod mocks base method. 56 func (m *MockManager) AddPod(arg0 *v1.Pod) { 57 m.ctrl.T.Helper() 58 m.ctrl.Call(m, "AddPod", arg0) 59 } 60 61 // AddPod indicates an expected call of AddPod. 62 func (mr *MockManagerMockRecorder) AddPod(arg0 interface{}) *gomock.Call { 63 mr.mock.ctrl.T.Helper() 64 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPod", reflect.TypeOf((*MockManager)(nil).AddPod), arg0) 65 } 66 67 // GetMirrorPodByPod mocks base method. 68 func (m *MockManager) GetMirrorPodByPod(arg0 *v1.Pod) (*v1.Pod, bool) { 69 m.ctrl.T.Helper() 70 ret := m.ctrl.Call(m, "GetMirrorPodByPod", arg0) 71 ret0, _ := ret[0].(*v1.Pod) 72 ret1, _ := ret[1].(bool) 73 return ret0, ret1 74 } 75 76 // GetMirrorPodByPod indicates an expected call of GetMirrorPodByPod. 77 func (mr *MockManagerMockRecorder) GetMirrorPodByPod(arg0 interface{}) *gomock.Call { 78 mr.mock.ctrl.T.Helper() 79 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMirrorPodByPod", reflect.TypeOf((*MockManager)(nil).GetMirrorPodByPod), arg0) 80 } 81 82 // GetPodAndMirrorPod mocks base method. 83 func (m *MockManager) GetPodAndMirrorPod(arg0 *v1.Pod) (*v1.Pod, *v1.Pod, bool) { 84 m.ctrl.T.Helper() 85 ret := m.ctrl.Call(m, "GetPodAndMirrorPod", arg0) 86 ret0, _ := ret[0].(*v1.Pod) 87 ret1, _ := ret[1].(*v1.Pod) 88 ret2, _ := ret[2].(bool) 89 return ret0, ret1, ret2 90 } 91 92 // GetPodAndMirrorPod indicates an expected call of GetPodAndMirrorPod. 93 func (mr *MockManagerMockRecorder) GetPodAndMirrorPod(arg0 interface{}) *gomock.Call { 94 mr.mock.ctrl.T.Helper() 95 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodAndMirrorPod", reflect.TypeOf((*MockManager)(nil).GetPodAndMirrorPod), arg0) 96 } 97 98 // GetPodByFullName mocks base method. 99 func (m *MockManager) GetPodByFullName(arg0 string) (*v1.Pod, bool) { 100 m.ctrl.T.Helper() 101 ret := m.ctrl.Call(m, "GetPodByFullName", arg0) 102 ret0, _ := ret[0].(*v1.Pod) 103 ret1, _ := ret[1].(bool) 104 return ret0, ret1 105 } 106 107 // GetPodByFullName indicates an expected call of GetPodByFullName. 108 func (mr *MockManagerMockRecorder) GetPodByFullName(arg0 interface{}) *gomock.Call { 109 mr.mock.ctrl.T.Helper() 110 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodByFullName", reflect.TypeOf((*MockManager)(nil).GetPodByFullName), arg0) 111 } 112 113 // GetPodByMirrorPod mocks base method. 114 func (m *MockManager) GetPodByMirrorPod(arg0 *v1.Pod) (*v1.Pod, bool) { 115 m.ctrl.T.Helper() 116 ret := m.ctrl.Call(m, "GetPodByMirrorPod", arg0) 117 ret0, _ := ret[0].(*v1.Pod) 118 ret1, _ := ret[1].(bool) 119 return ret0, ret1 120 } 121 122 // GetPodByMirrorPod indicates an expected call of GetPodByMirrorPod. 123 func (mr *MockManagerMockRecorder) GetPodByMirrorPod(arg0 interface{}) *gomock.Call { 124 mr.mock.ctrl.T.Helper() 125 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodByMirrorPod", reflect.TypeOf((*MockManager)(nil).GetPodByMirrorPod), arg0) 126 } 127 128 // GetPodByName mocks base method. 129 func (m *MockManager) GetPodByName(arg0, arg1 string) (*v1.Pod, bool) { 130 m.ctrl.T.Helper() 131 ret := m.ctrl.Call(m, "GetPodByName", arg0, arg1) 132 ret0, _ := ret[0].(*v1.Pod) 133 ret1, _ := ret[1].(bool) 134 return ret0, ret1 135 } 136 137 // GetPodByName indicates an expected call of GetPodByName. 138 func (mr *MockManagerMockRecorder) GetPodByName(arg0, arg1 interface{}) *gomock.Call { 139 mr.mock.ctrl.T.Helper() 140 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodByName", reflect.TypeOf((*MockManager)(nil).GetPodByName), arg0, arg1) 141 } 142 143 // GetPodByUID mocks base method. 144 func (m *MockManager) GetPodByUID(arg0 types.UID) (*v1.Pod, bool) { 145 m.ctrl.T.Helper() 146 ret := m.ctrl.Call(m, "GetPodByUID", arg0) 147 ret0, _ := ret[0].(*v1.Pod) 148 ret1, _ := ret[1].(bool) 149 return ret0, ret1 150 } 151 152 // GetPodByUID indicates an expected call of GetPodByUID. 153 func (mr *MockManagerMockRecorder) GetPodByUID(arg0 interface{}) *gomock.Call { 154 mr.mock.ctrl.T.Helper() 155 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodByUID", reflect.TypeOf((*MockManager)(nil).GetPodByUID), arg0) 156 } 157 158 // GetPods mocks base method. 159 func (m *MockManager) GetPods() []*v1.Pod { 160 m.ctrl.T.Helper() 161 ret := m.ctrl.Call(m, "GetPods") 162 ret0, _ := ret[0].([]*v1.Pod) 163 return ret0 164 } 165 166 // GetPods indicates an expected call of GetPods. 167 func (mr *MockManagerMockRecorder) GetPods() *gomock.Call { 168 mr.mock.ctrl.T.Helper() 169 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockManager)(nil).GetPods)) 170 } 171 172 // GetPodsAndMirrorPods mocks base method. 173 func (m *MockManager) GetPodsAndMirrorPods() ([]*v1.Pod, []*v1.Pod, []string) { 174 m.ctrl.T.Helper() 175 ret := m.ctrl.Call(m, "GetPodsAndMirrorPods") 176 ret0, _ := ret[0].([]*v1.Pod) 177 ret1, _ := ret[1].([]*v1.Pod) 178 ret2, _ := ret[2].([]string) 179 return ret0, ret1, ret2 180 } 181 182 // GetPodsAndMirrorPods indicates an expected call of GetPodsAndMirrorPods. 183 func (mr *MockManagerMockRecorder) GetPodsAndMirrorPods() *gomock.Call { 184 mr.mock.ctrl.T.Helper() 185 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodsAndMirrorPods", reflect.TypeOf((*MockManager)(nil).GetPodsAndMirrorPods)) 186 } 187 188 // GetUIDTranslations mocks base method. 189 func (m *MockManager) GetUIDTranslations() (map[types0.ResolvedPodUID]types0.MirrorPodUID, map[types0.MirrorPodUID]types0.ResolvedPodUID) { 190 m.ctrl.T.Helper() 191 ret := m.ctrl.Call(m, "GetUIDTranslations") 192 ret0, _ := ret[0].(map[types0.ResolvedPodUID]types0.MirrorPodUID) 193 ret1, _ := ret[1].(map[types0.MirrorPodUID]types0.ResolvedPodUID) 194 return ret0, ret1 195 } 196 197 // GetUIDTranslations indicates an expected call of GetUIDTranslations. 198 func (mr *MockManagerMockRecorder) GetUIDTranslations() *gomock.Call { 199 mr.mock.ctrl.T.Helper() 200 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUIDTranslations", reflect.TypeOf((*MockManager)(nil).GetUIDTranslations)) 201 } 202 203 // RemovePod mocks base method. 204 func (m *MockManager) RemovePod(arg0 *v1.Pod) { 205 m.ctrl.T.Helper() 206 m.ctrl.Call(m, "RemovePod", arg0) 207 } 208 209 // RemovePod indicates an expected call of RemovePod. 210 func (mr *MockManagerMockRecorder) RemovePod(arg0 interface{}) *gomock.Call { 211 mr.mock.ctrl.T.Helper() 212 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemovePod", reflect.TypeOf((*MockManager)(nil).RemovePod), arg0) 213 } 214 215 // SetPods mocks base method. 216 func (m *MockManager) SetPods(arg0 []*v1.Pod) { 217 m.ctrl.T.Helper() 218 m.ctrl.Call(m, "SetPods", arg0) 219 } 220 221 // SetPods indicates an expected call of SetPods. 222 func (mr *MockManagerMockRecorder) SetPods(arg0 interface{}) *gomock.Call { 223 mr.mock.ctrl.T.Helper() 224 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPods", reflect.TypeOf((*MockManager)(nil).SetPods), arg0) 225 } 226 227 // TranslatePodUID mocks base method. 228 func (m *MockManager) TranslatePodUID(arg0 types.UID) types0.ResolvedPodUID { 229 m.ctrl.T.Helper() 230 ret := m.ctrl.Call(m, "TranslatePodUID", arg0) 231 ret0, _ := ret[0].(types0.ResolvedPodUID) 232 return ret0 233 } 234 235 // TranslatePodUID indicates an expected call of TranslatePodUID. 236 func (mr *MockManagerMockRecorder) TranslatePodUID(arg0 interface{}) *gomock.Call { 237 mr.mock.ctrl.T.Helper() 238 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TranslatePodUID", reflect.TypeOf((*MockManager)(nil).TranslatePodUID), arg0) 239 } 240 241 // UpdatePod mocks base method. 242 func (m *MockManager) UpdatePod(arg0 *v1.Pod) { 243 m.ctrl.T.Helper() 244 m.ctrl.Call(m, "UpdatePod", arg0) 245 } 246 247 // UpdatePod indicates an expected call of UpdatePod. 248 func (mr *MockManagerMockRecorder) UpdatePod(arg0 interface{}) *gomock.Call { 249 mr.mock.ctrl.T.Helper() 250 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePod", reflect.TypeOf((*MockManager)(nil).UpdatePod), arg0) 251 }