Added the subPrefixDb mock
This commit is contained in:
parent
5d294b663c
commit
520f5abdcd
21
internal/mocks/subprefixdbmock.go
Normal file
21
internal/mocks/subprefixdbmock.go
Normal file
@ -0,0 +1,21 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
type MockSubPrefixDb struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *MockSubPrefixDb) Get(ctx context.Context, key []byte) ([]byte, error) {
|
||||
args := m.Called(ctx, key)
|
||||
return args.Get(0).([]byte), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockSubPrefixDb) Put(ctx context.Context, key, val []byte) error {
|
||||
args := m.Called(ctx, key, val)
|
||||
return args.Error(0)
|
||||
}
|
Loading…
Reference in New Issue
Block a user