github.com/IBM-Blockchain/fabric-operator@v1.0.4/pkg/offering/base/console/mocks/update.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package mocks 3 4 import ( 5 "sync" 6 7 baseconsole "github.com/IBM-Blockchain/fabric-operator/pkg/offering/base/console" 8 ) 9 10 type Update struct { 11 ConsoleCMUpdatedStub func() bool 12 consoleCMUpdatedMutex sync.RWMutex 13 consoleCMUpdatedArgsForCall []struct { 14 } 15 consoleCMUpdatedReturns struct { 16 result1 bool 17 } 18 consoleCMUpdatedReturnsOnCall map[int]struct { 19 result1 bool 20 } 21 DeployerCMUpdatedStub func() bool 22 deployerCMUpdatedMutex sync.RWMutex 23 deployerCMUpdatedArgsForCall []struct { 24 } 25 deployerCMUpdatedReturns struct { 26 result1 bool 27 } 28 deployerCMUpdatedReturnsOnCall map[int]struct { 29 result1 bool 30 } 31 EnvCMUpdatedStub func() bool 32 envCMUpdatedMutex sync.RWMutex 33 envCMUpdatedArgsForCall []struct { 34 } 35 envCMUpdatedReturns struct { 36 result1 bool 37 } 38 envCMUpdatedReturnsOnCall map[int]struct { 39 result1 bool 40 } 41 RestartNeededStub func() bool 42 restartNeededMutex sync.RWMutex 43 restartNeededArgsForCall []struct { 44 } 45 restartNeededReturns struct { 46 result1 bool 47 } 48 restartNeededReturnsOnCall map[int]struct { 49 result1 bool 50 } 51 SpecUpdatedStub func() bool 52 specUpdatedMutex sync.RWMutex 53 specUpdatedArgsForCall []struct { 54 } 55 specUpdatedReturns struct { 56 result1 bool 57 } 58 specUpdatedReturnsOnCall map[int]struct { 59 result1 bool 60 } 61 invocations map[string][][]interface{} 62 invocationsMutex sync.RWMutex 63 } 64 65 func (fake *Update) ConsoleCMUpdated() bool { 66 fake.consoleCMUpdatedMutex.Lock() 67 ret, specificReturn := fake.consoleCMUpdatedReturnsOnCall[len(fake.consoleCMUpdatedArgsForCall)] 68 fake.consoleCMUpdatedArgsForCall = append(fake.consoleCMUpdatedArgsForCall, struct { 69 }{}) 70 stub := fake.ConsoleCMUpdatedStub 71 fakeReturns := fake.consoleCMUpdatedReturns 72 fake.recordInvocation("ConsoleCMUpdated", []interface{}{}) 73 fake.consoleCMUpdatedMutex.Unlock() 74 if stub != nil { 75 return stub() 76 } 77 if specificReturn { 78 return ret.result1 79 } 80 return fakeReturns.result1 81 } 82 83 func (fake *Update) ConsoleCMUpdatedCallCount() int { 84 fake.consoleCMUpdatedMutex.RLock() 85 defer fake.consoleCMUpdatedMutex.RUnlock() 86 return len(fake.consoleCMUpdatedArgsForCall) 87 } 88 89 func (fake *Update) ConsoleCMUpdatedCalls(stub func() bool) { 90 fake.consoleCMUpdatedMutex.Lock() 91 defer fake.consoleCMUpdatedMutex.Unlock() 92 fake.ConsoleCMUpdatedStub = stub 93 } 94 95 func (fake *Update) ConsoleCMUpdatedReturns(result1 bool) { 96 fake.consoleCMUpdatedMutex.Lock() 97 defer fake.consoleCMUpdatedMutex.Unlock() 98 fake.ConsoleCMUpdatedStub = nil 99 fake.consoleCMUpdatedReturns = struct { 100 result1 bool 101 }{result1} 102 } 103 104 func (fake *Update) ConsoleCMUpdatedReturnsOnCall(i int, result1 bool) { 105 fake.consoleCMUpdatedMutex.Lock() 106 defer fake.consoleCMUpdatedMutex.Unlock() 107 fake.ConsoleCMUpdatedStub = nil 108 if fake.consoleCMUpdatedReturnsOnCall == nil { 109 fake.consoleCMUpdatedReturnsOnCall = make(map[int]struct { 110 result1 bool 111 }) 112 } 113 fake.consoleCMUpdatedReturnsOnCall[i] = struct { 114 result1 bool 115 }{result1} 116 } 117 118 func (fake *Update) DeployerCMUpdated() bool { 119 fake.deployerCMUpdatedMutex.Lock() 120 ret, specificReturn := fake.deployerCMUpdatedReturnsOnCall[len(fake.deployerCMUpdatedArgsForCall)] 121 fake.deployerCMUpdatedArgsForCall = append(fake.deployerCMUpdatedArgsForCall, struct { 122 }{}) 123 stub := fake.DeployerCMUpdatedStub 124 fakeReturns := fake.deployerCMUpdatedReturns 125 fake.recordInvocation("DeployerCMUpdated", []interface{}{}) 126 fake.deployerCMUpdatedMutex.Unlock() 127 if stub != nil { 128 return stub() 129 } 130 if specificReturn { 131 return ret.result1 132 } 133 return fakeReturns.result1 134 } 135 136 func (fake *Update) DeployerCMUpdatedCallCount() int { 137 fake.deployerCMUpdatedMutex.RLock() 138 defer fake.deployerCMUpdatedMutex.RUnlock() 139 return len(fake.deployerCMUpdatedArgsForCall) 140 } 141 142 func (fake *Update) DeployerCMUpdatedCalls(stub func() bool) { 143 fake.deployerCMUpdatedMutex.Lock() 144 defer fake.deployerCMUpdatedMutex.Unlock() 145 fake.DeployerCMUpdatedStub = stub 146 } 147 148 func (fake *Update) DeployerCMUpdatedReturns(result1 bool) { 149 fake.deployerCMUpdatedMutex.Lock() 150 defer fake.deployerCMUpdatedMutex.Unlock() 151 fake.DeployerCMUpdatedStub = nil 152 fake.deployerCMUpdatedReturns = struct { 153 result1 bool 154 }{result1} 155 } 156 157 func (fake *Update) DeployerCMUpdatedReturnsOnCall(i int, result1 bool) { 158 fake.deployerCMUpdatedMutex.Lock() 159 defer fake.deployerCMUpdatedMutex.Unlock() 160 fake.DeployerCMUpdatedStub = nil 161 if fake.deployerCMUpdatedReturnsOnCall == nil { 162 fake.deployerCMUpdatedReturnsOnCall = make(map[int]struct { 163 result1 bool 164 }) 165 } 166 fake.deployerCMUpdatedReturnsOnCall[i] = struct { 167 result1 bool 168 }{result1} 169 } 170 171 func (fake *Update) EnvCMUpdated() bool { 172 fake.envCMUpdatedMutex.Lock() 173 ret, specificReturn := fake.envCMUpdatedReturnsOnCall[len(fake.envCMUpdatedArgsForCall)] 174 fake.envCMUpdatedArgsForCall = append(fake.envCMUpdatedArgsForCall, struct { 175 }{}) 176 stub := fake.EnvCMUpdatedStub 177 fakeReturns := fake.envCMUpdatedReturns 178 fake.recordInvocation("EnvCMUpdated", []interface{}{}) 179 fake.envCMUpdatedMutex.Unlock() 180 if stub != nil { 181 return stub() 182 } 183 if specificReturn { 184 return ret.result1 185 } 186 return fakeReturns.result1 187 } 188 189 func (fake *Update) EnvCMUpdatedCallCount() int { 190 fake.envCMUpdatedMutex.RLock() 191 defer fake.envCMUpdatedMutex.RUnlock() 192 return len(fake.envCMUpdatedArgsForCall) 193 } 194 195 func (fake *Update) EnvCMUpdatedCalls(stub func() bool) { 196 fake.envCMUpdatedMutex.Lock() 197 defer fake.envCMUpdatedMutex.Unlock() 198 fake.EnvCMUpdatedStub = stub 199 } 200 201 func (fake *Update) EnvCMUpdatedReturns(result1 bool) { 202 fake.envCMUpdatedMutex.Lock() 203 defer fake.envCMUpdatedMutex.Unlock() 204 fake.EnvCMUpdatedStub = nil 205 fake.envCMUpdatedReturns = struct { 206 result1 bool 207 }{result1} 208 } 209 210 func (fake *Update) EnvCMUpdatedReturnsOnCall(i int, result1 bool) { 211 fake.envCMUpdatedMutex.Lock() 212 defer fake.envCMUpdatedMutex.Unlock() 213 fake.EnvCMUpdatedStub = nil 214 if fake.envCMUpdatedReturnsOnCall == nil { 215 fake.envCMUpdatedReturnsOnCall = make(map[int]struct { 216 result1 bool 217 }) 218 } 219 fake.envCMUpdatedReturnsOnCall[i] = struct { 220 result1 bool 221 }{result1} 222 } 223 224 func (fake *Update) RestartNeeded() bool { 225 fake.restartNeededMutex.Lock() 226 ret, specificReturn := fake.restartNeededReturnsOnCall[len(fake.restartNeededArgsForCall)] 227 fake.restartNeededArgsForCall = append(fake.restartNeededArgsForCall, struct { 228 }{}) 229 stub := fake.RestartNeededStub 230 fakeReturns := fake.restartNeededReturns 231 fake.recordInvocation("RestartNeeded", []interface{}{}) 232 fake.restartNeededMutex.Unlock() 233 if stub != nil { 234 return stub() 235 } 236 if specificReturn { 237 return ret.result1 238 } 239 return fakeReturns.result1 240 } 241 242 func (fake *Update) RestartNeededCallCount() int { 243 fake.restartNeededMutex.RLock() 244 defer fake.restartNeededMutex.RUnlock() 245 return len(fake.restartNeededArgsForCall) 246 } 247 248 func (fake *Update) RestartNeededCalls(stub func() bool) { 249 fake.restartNeededMutex.Lock() 250 defer fake.restartNeededMutex.Unlock() 251 fake.RestartNeededStub = stub 252 } 253 254 func (fake *Update) RestartNeededReturns(result1 bool) { 255 fake.restartNeededMutex.Lock() 256 defer fake.restartNeededMutex.Unlock() 257 fake.RestartNeededStub = nil 258 fake.restartNeededReturns = struct { 259 result1 bool 260 }{result1} 261 } 262 263 func (fake *Update) RestartNeededReturnsOnCall(i int, result1 bool) { 264 fake.restartNeededMutex.Lock() 265 defer fake.restartNeededMutex.Unlock() 266 fake.RestartNeededStub = nil 267 if fake.restartNeededReturnsOnCall == nil { 268 fake.restartNeededReturnsOnCall = make(map[int]struct { 269 result1 bool 270 }) 271 } 272 fake.restartNeededReturnsOnCall[i] = struct { 273 result1 bool 274 }{result1} 275 } 276 277 func (fake *Update) SpecUpdated() bool { 278 fake.specUpdatedMutex.Lock() 279 ret, specificReturn := fake.specUpdatedReturnsOnCall[len(fake.specUpdatedArgsForCall)] 280 fake.specUpdatedArgsForCall = append(fake.specUpdatedArgsForCall, struct { 281 }{}) 282 stub := fake.SpecUpdatedStub 283 fakeReturns := fake.specUpdatedReturns 284 fake.recordInvocation("SpecUpdated", []interface{}{}) 285 fake.specUpdatedMutex.Unlock() 286 if stub != nil { 287 return stub() 288 } 289 if specificReturn { 290 return ret.result1 291 } 292 return fakeReturns.result1 293 } 294 295 func (fake *Update) SpecUpdatedCallCount() int { 296 fake.specUpdatedMutex.RLock() 297 defer fake.specUpdatedMutex.RUnlock() 298 return len(fake.specUpdatedArgsForCall) 299 } 300 301 func (fake *Update) SpecUpdatedCalls(stub func() bool) { 302 fake.specUpdatedMutex.Lock() 303 defer fake.specUpdatedMutex.Unlock() 304 fake.SpecUpdatedStub = stub 305 } 306 307 func (fake *Update) SpecUpdatedReturns(result1 bool) { 308 fake.specUpdatedMutex.Lock() 309 defer fake.specUpdatedMutex.Unlock() 310 fake.SpecUpdatedStub = nil 311 fake.specUpdatedReturns = struct { 312 result1 bool 313 }{result1} 314 } 315 316 func (fake *Update) SpecUpdatedReturnsOnCall(i int, result1 bool) { 317 fake.specUpdatedMutex.Lock() 318 defer fake.specUpdatedMutex.Unlock() 319 fake.SpecUpdatedStub = nil 320 if fake.specUpdatedReturnsOnCall == nil { 321 fake.specUpdatedReturnsOnCall = make(map[int]struct { 322 result1 bool 323 }) 324 } 325 fake.specUpdatedReturnsOnCall[i] = struct { 326 result1 bool 327 }{result1} 328 } 329 330 func (fake *Update) Invocations() map[string][][]interface{} { 331 fake.invocationsMutex.RLock() 332 defer fake.invocationsMutex.RUnlock() 333 fake.consoleCMUpdatedMutex.RLock() 334 defer fake.consoleCMUpdatedMutex.RUnlock() 335 fake.deployerCMUpdatedMutex.RLock() 336 defer fake.deployerCMUpdatedMutex.RUnlock() 337 fake.envCMUpdatedMutex.RLock() 338 defer fake.envCMUpdatedMutex.RUnlock() 339 fake.restartNeededMutex.RLock() 340 defer fake.restartNeededMutex.RUnlock() 341 fake.specUpdatedMutex.RLock() 342 defer fake.specUpdatedMutex.RUnlock() 343 copiedInvocations := map[string][][]interface{}{} 344 for key, value := range fake.invocations { 345 copiedInvocations[key] = value 346 } 347 return copiedInvocations 348 } 349 350 func (fake *Update) recordInvocation(key string, args []interface{}) { 351 fake.invocationsMutex.Lock() 352 defer fake.invocationsMutex.Unlock() 353 if fake.invocations == nil { 354 fake.invocations = map[string][][]interface{}{} 355 } 356 if fake.invocations[key] == nil { 357 fake.invocations[key] = [][]interface{}{} 358 } 359 fake.invocations[key] = append(fake.invocations[key], args) 360 } 361 362 var _ baseconsole.Update = new(Update)