mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-11 09:46:26 +08:00
22477d4601
Signed-off-by: longjiquan <jiquan.long@zilliz.com> Signed-off-by: longjiquan <jiquan.long@zilliz.com>
88 lines
2.5 KiB
Go
88 lines
2.5 KiB
Go
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
|
|
|
package mockrootcoord
|
|
|
|
import (
|
|
context "context"
|
|
|
|
model "github.com/milvus-io/milvus/internal/metastore/model"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// GarbageCollector is an autogenerated mock type for the GarbageCollector type
|
|
type GarbageCollector struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// GcCollectionData provides a mock function with given fields: ctx, coll
|
|
func (_m *GarbageCollector) GcCollectionData(ctx context.Context, coll *model.Collection) (uint64, error) {
|
|
ret := _m.Called(ctx, coll)
|
|
|
|
var r0 uint64
|
|
if rf, ok := ret.Get(0).(func(context.Context, *model.Collection) uint64); ok {
|
|
r0 = rf(ctx, coll)
|
|
} else {
|
|
r0 = ret.Get(0).(uint64)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, *model.Collection) error); ok {
|
|
r1 = rf(ctx, coll)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GcPartitionData provides a mock function with given fields: ctx, pChannels, partition
|
|
func (_m *GarbageCollector) GcPartitionData(ctx context.Context, pChannels []string, partition *model.Partition) (uint64, error) {
|
|
ret := _m.Called(ctx, pChannels, partition)
|
|
|
|
var r0 uint64
|
|
if rf, ok := ret.Get(0).(func(context.Context, []string, *model.Partition) uint64); ok {
|
|
r0 = rf(ctx, pChannels, partition)
|
|
} else {
|
|
r0 = ret.Get(0).(uint64)
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(context.Context, []string, *model.Partition) error); ok {
|
|
r1 = rf(ctx, pChannels, partition)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ReDropCollection provides a mock function with given fields: collMeta, ts
|
|
func (_m *GarbageCollector) ReDropCollection(collMeta *model.Collection, ts uint64) {
|
|
_m.Called(collMeta, ts)
|
|
}
|
|
|
|
// ReDropPartition provides a mock function with given fields: pChannels, partition, ts
|
|
func (_m *GarbageCollector) ReDropPartition(pChannels []string, partition *model.Partition, ts uint64) {
|
|
_m.Called(pChannels, partition, ts)
|
|
}
|
|
|
|
// RemoveCreatingCollection provides a mock function with given fields: collMeta
|
|
func (_m *GarbageCollector) RemoveCreatingCollection(collMeta *model.Collection) {
|
|
_m.Called(collMeta)
|
|
}
|
|
|
|
type mockConstructorTestingTNewGarbageCollector interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// NewGarbageCollector creates a new instance of GarbageCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
func NewGarbageCollector(t mockConstructorTestingTNewGarbageCollector) *GarbageCollector {
|
|
mock := &GarbageCollector{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|