codeman 6c3dbf0a07
Support meta storing on database (#17236) (#18541)
Signed-off-by: kejiang <ke.jiang@zilliz.com>

Signed-off-by: kejiang <ke.jiang@zilliz.com>
Co-authored-by: kejiang <ke.jiang@zilliz.com>
2022-08-11 12:12:38 +08:00

110 lines
2.8 KiB
Go

// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
dbmodel "github.com/milvus-io/milvus/internal/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
)
// ICollAliasDb is an autogenerated mock type for the ICollAliasDb type
type ICollAliasDb struct {
mock.Mock
}
// GetCollectionIDByAlias provides a mock function with given fields: tenantID, alias, ts
func (_m *ICollAliasDb) GetCollectionIDByAlias(tenantID string, alias string, ts uint64) (int64, error) {
ret := _m.Called(tenantID, alias, ts)
var r0 int64
if rf, ok := ret.Get(0).(func(string, string, uint64) int64); ok {
r0 = rf(tenantID, alias, ts)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string, uint64) error); ok {
r1 = rf(tenantID, alias, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Insert provides a mock function with given fields: in
func (_m *ICollAliasDb) Insert(in []*dbmodel.CollectionAlias) error {
ret := _m.Called(in)
var r0 error
if rf, ok := ret.Get(0).(func([]*dbmodel.CollectionAlias) error); ok {
r0 = rf(in)
} else {
r0 = ret.Error(0)
}
return r0
}
// List provides a mock function with given fields: tenantID, cidTsPairs
func (_m *ICollAliasDb) List(tenantID string, cidTsPairs []*dbmodel.CollectionAlias) ([]*dbmodel.CollectionAlias, error) {
ret := _m.Called(tenantID, cidTsPairs)
var r0 []*dbmodel.CollectionAlias
if rf, ok := ret.Get(0).(func(string, []*dbmodel.CollectionAlias) []*dbmodel.CollectionAlias); ok {
r0 = rf(tenantID, cidTsPairs)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*dbmodel.CollectionAlias)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, []*dbmodel.CollectionAlias) error); ok {
r1 = rf(tenantID, cidTsPairs)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListCollectionIDTs provides a mock function with given fields: tenantID, ts
func (_m *ICollAliasDb) ListCollectionIDTs(tenantID string, ts uint64) ([]*dbmodel.CollectionAlias, error) {
ret := _m.Called(tenantID, ts)
var r0 []*dbmodel.CollectionAlias
if rf, ok := ret.Get(0).(func(string, uint64) []*dbmodel.CollectionAlias); ok {
r0 = rf(tenantID, ts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*dbmodel.CollectionAlias)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, uint64) error); ok {
r1 = rf(tenantID, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewICollAliasDb interface {
mock.TestingT
Cleanup(func())
}
// NewICollAliasDb creates a new instance of ICollAliasDb. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewICollAliasDb(t mockConstructorTestingTNewICollAliasDb) *ICollAliasDb {
mock := &ICollAliasDb{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}