Jiquan Long a5e2d6b6fb
Refactor RootCoord (#18930)
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
Co-authored-by: xaxys <tpnnghd@163.com>

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
Co-authored-by: xaxys <tpnnghd@163.com>
2022-09-05 13:29:11 +08:00

147 lines
3.7 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"
)
// ICollectionDb is an autogenerated mock type for the ICollectionDb type
type ICollectionDb struct {
mock.Mock
}
// Get provides a mock function with given fields: tenantID, collectionID, ts
func (_m *ICollectionDb) Get(tenantID string, collectionID int64, ts uint64) (*dbmodel.Collection, error) {
ret := _m.Called(tenantID, collectionID, ts)
var r0 *dbmodel.Collection
if rf, ok := ret.Get(0).(func(string, int64, uint64) *dbmodel.Collection); ok {
r0 = rf(tenantID, collectionID, ts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*dbmodel.Collection)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, int64, uint64) error); ok {
r1 = rf(tenantID, collectionID, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCollectionIDByName provides a mock function with given fields: tenantID, collectionName, ts
func (_m *ICollectionDb) GetCollectionIDByName(tenantID string, collectionName string, ts uint64) (int64, error) {
ret := _m.Called(tenantID, collectionName, ts)
var r0 int64
if rf, ok := ret.Get(0).(func(string, string, uint64) int64); ok {
r0 = rf(tenantID, collectionName, 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, collectionName, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCollectionIDTs provides a mock function with given fields: tenantID, collectionID, ts
func (_m *ICollectionDb) GetCollectionIDTs(tenantID string, collectionID int64, ts uint64) (*dbmodel.Collection, error) {
ret := _m.Called(tenantID, collectionID, ts)
var r0 *dbmodel.Collection
if rf, ok := ret.Get(0).(func(string, int64, uint64) *dbmodel.Collection); ok {
r0 = rf(tenantID, collectionID, ts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*dbmodel.Collection)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, int64, uint64) error); ok {
r1 = rf(tenantID, collectionID, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Insert provides a mock function with given fields: in
func (_m *ICollectionDb) Insert(in *dbmodel.Collection) error {
ret := _m.Called(in)
var r0 error
if rf, ok := ret.Get(0).(func(*dbmodel.Collection) error); ok {
r0 = rf(in)
} else {
r0 = ret.Error(0)
}
return r0
}
// ListCollectionIDTs provides a mock function with given fields: tenantID, ts
func (_m *ICollectionDb) ListCollectionIDTs(tenantID string, ts uint64) ([]*dbmodel.Collection, error) {
ret := _m.Called(tenantID, ts)
var r0 []*dbmodel.Collection
if rf, ok := ret.Get(0).(func(string, uint64) []*dbmodel.Collection); ok {
r0 = rf(tenantID, ts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*dbmodel.Collection)
}
}
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
}
// Update provides a mock function with given fields: in
func (_m *ICollectionDb) Update(in *dbmodel.Collection) error {
ret := _m.Called(in)
var r0 error
if rf, ok := ret.Get(0).(func(*dbmodel.Collection) error); ok {
r0 = rf(in)
} else {
r0 = ret.Error(0)
}
return r0
}
type mockConstructorTestingTNewICollectionDb interface {
mock.TestingT
Cleanup(func())
}
// NewICollectionDb creates a new instance of ICollectionDb. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewICollectionDb(t mockConstructorTestingTNewICollectionDb) *ICollectionDb {
mock := &ICollectionDb{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}