database: remove FindLock from mock
This commit is contained in:
parent
f64bd117b2
commit
dd91597f19
@ -48,7 +48,6 @@ type MockSession struct {
|
|||||||
FctFindKeyValue func(key string) (string, bool, error)
|
FctFindKeyValue func(key string) (string, bool, error)
|
||||||
FctLock func(name string, owner string, duration time.Duration, renew bool) (bool, time.Time, error)
|
FctLock func(name string, owner string, duration time.Duration, renew bool) (bool, time.Time, error)
|
||||||
FctUnlock func(name, owner string) error
|
FctUnlock func(name, owner string) error
|
||||||
FctFindLock func(name string) (string, time.Time, bool, error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ms *MockSession) Commit() error {
|
func (ms *MockSession) Commit() error {
|
||||||
@ -220,13 +219,6 @@ func (ms *MockSession) Unlock(name, owner string) error {
|
|||||||
panic("required mock function not implemented")
|
panic("required mock function not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ms *MockSession) FindLock(name string) (string, time.Time, bool, error) {
|
|
||||||
if ms.FctFindLock != nil {
|
|
||||||
return ms.FctFindLock(name)
|
|
||||||
}
|
|
||||||
panic("required mock function not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
// MockDatastore implements Datastore and enables overriding each available method.
|
// MockDatastore implements Datastore and enables overriding each available method.
|
||||||
// The default behavior of each method is to simply panic.
|
// The default behavior of each method is to simply panic.
|
||||||
type MockDatastore struct {
|
type MockDatastore struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user