141 lines
3.6 KiB
Go
141 lines
3.6 KiB
Go
// Code generated by counterfeiter. DO NOT EDIT.
|
|
package testfakes
|
|
|
|
import (
|
|
"sync"
|
|
)
|
|
|
|
type FakeCertDirManager struct {
|
|
CreateStub func() (string, error)
|
|
createMutex sync.RWMutex
|
|
createArgsForCall []struct{}
|
|
createReturns struct {
|
|
result1 string
|
|
result2 error
|
|
}
|
|
createReturnsOnCall map[int]struct {
|
|
result1 string
|
|
result2 error
|
|
}
|
|
DestroyStub func() error
|
|
destroyMutex sync.RWMutex
|
|
destroyArgsForCall []struct{}
|
|
destroyReturns struct {
|
|
result1 error
|
|
}
|
|
destroyReturnsOnCall map[int]struct {
|
|
result1 error
|
|
}
|
|
invocations map[string][][]interface{}
|
|
invocationsMutex sync.RWMutex
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) Create() (string, error) {
|
|
fake.createMutex.Lock()
|
|
ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)]
|
|
fake.createArgsForCall = append(fake.createArgsForCall, struct{}{})
|
|
fake.recordInvocation("Create", []interface{}{})
|
|
fake.createMutex.Unlock()
|
|
if fake.CreateStub != nil {
|
|
return fake.CreateStub()
|
|
}
|
|
if specificReturn {
|
|
return ret.result1, ret.result2
|
|
}
|
|
return fake.createReturns.result1, fake.createReturns.result2
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) CreateCallCount() int {
|
|
fake.createMutex.RLock()
|
|
defer fake.createMutex.RUnlock()
|
|
return len(fake.createArgsForCall)
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) CreateReturns(result1 string, result2 error) {
|
|
fake.CreateStub = nil
|
|
fake.createReturns = struct {
|
|
result1 string
|
|
result2 error
|
|
}{result1, result2}
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) CreateReturnsOnCall(i int, result1 string, result2 error) {
|
|
fake.CreateStub = nil
|
|
if fake.createReturnsOnCall == nil {
|
|
fake.createReturnsOnCall = make(map[int]struct {
|
|
result1 string
|
|
result2 error
|
|
})
|
|
}
|
|
fake.createReturnsOnCall[i] = struct {
|
|
result1 string
|
|
result2 error
|
|
}{result1, result2}
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) Destroy() error {
|
|
fake.destroyMutex.Lock()
|
|
ret, specificReturn := fake.destroyReturnsOnCall[len(fake.destroyArgsForCall)]
|
|
fake.destroyArgsForCall = append(fake.destroyArgsForCall, struct{}{})
|
|
fake.recordInvocation("Destroy", []interface{}{})
|
|
fake.destroyMutex.Unlock()
|
|
if fake.DestroyStub != nil {
|
|
return fake.DestroyStub()
|
|
}
|
|
if specificReturn {
|
|
return ret.result1
|
|
}
|
|
return fake.destroyReturns.result1
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) DestroyCallCount() int {
|
|
fake.destroyMutex.RLock()
|
|
defer fake.destroyMutex.RUnlock()
|
|
return len(fake.destroyArgsForCall)
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) DestroyReturns(result1 error) {
|
|
fake.DestroyStub = nil
|
|
fake.destroyReturns = struct {
|
|
result1 error
|
|
}{result1}
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) DestroyReturnsOnCall(i int, result1 error) {
|
|
fake.DestroyStub = nil
|
|
if fake.destroyReturnsOnCall == nil {
|
|
fake.destroyReturnsOnCall = make(map[int]struct {
|
|
result1 error
|
|
})
|
|
}
|
|
fake.destroyReturnsOnCall[i] = struct {
|
|
result1 error
|
|
}{result1}
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) Invocations() map[string][][]interface{} {
|
|
fake.invocationsMutex.RLock()
|
|
defer fake.invocationsMutex.RUnlock()
|
|
fake.createMutex.RLock()
|
|
defer fake.createMutex.RUnlock()
|
|
fake.destroyMutex.RLock()
|
|
defer fake.destroyMutex.RUnlock()
|
|
copiedInvocations := map[string][][]interface{}{}
|
|
for key, value := range fake.invocations {
|
|
copiedInvocations[key] = value
|
|
}
|
|
return copiedInvocations
|
|
}
|
|
|
|
func (fake *FakeCertDirManager) recordInvocation(key string, args []interface{}) {
|
|
fake.invocationsMutex.Lock()
|
|
defer fake.invocationsMutex.Unlock()
|
|
if fake.invocations == nil {
|
|
fake.invocations = map[string][][]interface{}{}
|
|
}
|
|
if fake.invocations[key] == nil {
|
|
fake.invocations[key] = [][]interface{}{}
|
|
}
|
|
fake.invocations[key] = append(fake.invocations[key], args)
|
|
}
|