mirror of https://github.com/milvus-io/milvus.git
121 lines
2.8 KiB
Go
121 lines
2.8 KiB
Go
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
|
|
// SnapShotKV is an autogenerated mock type for the SnapShotKV type
|
|
type SnapShotKV struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Load provides a mock function with given fields: key, ts
|
|
func (_m *SnapShotKV) Load(key string, ts uint64) (string, error) {
|
|
ret := _m.Called(key, ts)
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func(string, uint64) string); ok {
|
|
r0 = rf(key, ts)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string, uint64) error); ok {
|
|
r1 = rf(key, ts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LoadWithPrefix provides a mock function with given fields: key, ts
|
|
func (_m *SnapShotKV) LoadWithPrefix(key string, ts uint64) ([]string, []string, error) {
|
|
ret := _m.Called(key, ts)
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(string, uint64) []string); ok {
|
|
r0 = rf(key, ts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
var r1 []string
|
|
if rf, ok := ret.Get(1).(func(string, uint64) []string); ok {
|
|
r1 = rf(key, ts)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).([]string)
|
|
}
|
|
}
|
|
|
|
var r2 error
|
|
if rf, ok := ret.Get(2).(func(string, uint64) error); ok {
|
|
r2 = rf(key, ts)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// MultiSave provides a mock function with given fields: kvs, ts
|
|
func (_m *SnapShotKV) MultiSave(kvs map[string]string, ts uint64) error {
|
|
ret := _m.Called(kvs, ts)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(map[string]string, uint64) error); ok {
|
|
r0 = rf(kvs, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MultiSaveAndRemoveWithPrefix provides a mock function with given fields: saves, removals, ts
|
|
func (_m *SnapShotKV) MultiSaveAndRemoveWithPrefix(saves map[string]string, removals []string, ts uint64) error {
|
|
ret := _m.Called(saves, removals, ts)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(map[string]string, []string, uint64) error); ok {
|
|
r0 = rf(saves, removals, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Save provides a mock function with given fields: key, value, ts
|
|
func (_m *SnapShotKV) Save(key string, value string, ts uint64) error {
|
|
ret := _m.Called(key, value, ts)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, uint64) error); ok {
|
|
r0 = rf(key, value, ts)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
type mockConstructorTestingTNewSnapShotKV interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// NewSnapShotKV creates a new instance of SnapShotKV. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
func NewSnapShotKV(t mockConstructorTestingTNewSnapShotKV) *SnapShotKV {
|
|
mock := &SnapShotKV{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|