Organize all mockery generation commands in Makefile (#26826)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/26835/head
congqixia 2023-09-04 21:19:48 +08:00 committed by GitHub
parent 1097776477
commit 1a8cf5c415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 4568 additions and 1646 deletions

111
Makefile
View File

@ -314,50 +314,77 @@ rpm: install
@cp -r build/rpm/services ~/rpmbuild/BUILD/
@QA_RPATHS="$$[ 0x001|0x0002|0x0020 ]" rpmbuild -ba ./build/rpm/milvus.spec
mock-proxy:
mockery --name=ProxyComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_proxy.go --structname=MockProxy --with-expecter
generate-mockery-types: getdeps
# RootCoord
$(INSTALL_PATH)/mockery --name=RootCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_rootcoord.go --with-expecter --structname=RootCoord
# Proxy
$(INSTALL_PATH)/mockery --name=ProxyComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_proxy.go --with-expecter --structname=MockProxy
# QueryCoord
$(INSTALL_PATH)/mockery --name=QueryCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querycoord.go --with-expecter --structname=MockQueryCoord
# QueryNode
$(INSTALL_PATH)/mockery --name=QueryNodeComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querynode.go --with-expecter --structname=MockQueryNode
# DataCoord
$(INSTALL_PATH)/mockery --name=DataCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datacoord.go --with-expecter --structname=MockDataCoord
# DataNode
$(INSTALL_PATH)/mockery --name=DataNodeComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datanode.go --with-expecter --structname=MockDataNode
# IndexNode
$(INSTALL_PATH)/mockery --name=IndexNodeComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_indexnode.go --with-expecter --structname=MockIndexNode
mock-datanode:
mockery --name=DataNode --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datanode.go --with-expecter
generate-mockery-rootcoord: getdeps
$(INSTALL_PATH)/mockery --name=IMetaTable --dir=$(PWD)/internal/rootcoord --output=$(PWD)/internal/rootcoord/mocks --filename=meta_table.go --with-expecter --outpkg=mockrootcoord
$(INSTALL_PATH)/mockery --name=GarbageCollector --dir=$(PWD)/internal/rootcoord --output=$(PWD)/internal/rootcoord/mocks --filename=garbage_collector.go --with-expecter --outpkg=mockrootcoord
mock-rootcoord:
mockery --name=RootCoord --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_rootcoord.go --with-expecter
generate-mockery-proxy: getdeps
$(INSTALL_PATH)/mockery --name=Cache --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_cache.go --structname=MockCache --with-expecter --outpkg=proxy --inpackage
$(INSTALL_PATH)/mockery --name=timestampAllocatorInterface --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_tso_test.go --structname=mockTimestampAllocator --with-expecter --outpkg=proxy --inpackage
$(INSTALL_PATH)/mockery --name=LBPolicy --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_lb_policy.go --structname=MockLBPolicy --with-expecter --outpkg=proxy --inpackage
$(INSTALL_PATH)/mockery --name=LBBalancer --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_lb_balancer.go --structname=MockLBBalancer --with-expecter --outpkg=proxy --inpackage
$(INSTALL_PATH)/mockery --name=shardClientMgr --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_shardclient_manager.go --structname=MockShardClientManager --with-expecter --outpkg=proxy --inpackage
mock-datacoord:
mockery --name=DataCoord --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datacoord.go --with-expecter
generate-mockery-querycoord: getdeps
$(INSTALL_PATH)/mockery --name=QueryNodeServer --dir=$(PWD)/internal/proto/querypb/ --output=$(PWD)/internal/querycoordv2/mocks --filename=mock_querynode.go --with-expecter --structname=MockQueryNodeServer
$(INSTALL_PATH)/mockery --name=Broker --dir=$(PWD)/internal/querycoordv2/meta --output=$(PWD)/internal/querycoordv2/meta --filename=mock_broker.go --with-expecter --structname=MockBroker --outpkg=meta
$(INSTALL_PATH)/mockery --name=Scheduler --dir=$(PWD)/internal/querycoordv2/task --output=$(PWD)/internal/querycoordv2/task --filename=mock_scheduler.go --with-expecter --structname=MockScheduler --outpkg=task --inpackage
$(INSTALL_PATH)/mockery --name=Cluster --dir=$(PWD)/internal/querycoordv2/session --output=$(PWD)/internal/querycoordv2/session --filename=mock_cluster.go --with-expecter --structname=MockCluster --outpkg=session --inpackage
$(INSTALL_PATH)/mockery --name=Balance --dir=$(PWD)/internal/querycoordv2/balance --output=$(PWD)/internal/querycoordv2/balance --filename=mock_balancer.go --with-expecter --structname=MockBalancer --outpkg=balance --inpackage
$(INSTALL_PATH)/mockery --name=Controller --dir=$(PWD)/internal/querycoordv2/dist --output=$(PWD)/internal/querycoordv2/dist --filename=mock_controller.go --with-expecter --structname=MockController --outpkg=dist --inpackage
mock-tnx-kv:
mockery --name=TxnKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=TxnKV.go --with-expecter
generate-mockery-querynode: getdeps
$(INSTALL_PATH)/mockery --name=Manager --dir=$(PWD)/internal/querynodev2/cluster --output=$(PWD)/internal/querynodev2/cluster --filename=mock_manager.go --with-expecter --outpkg=cluster --structname=MockManager --inpackage
$(INSTALL_PATH)/mockery --name=SegmentManager --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_segment_manager.go --with-expecter --outpkg=segments --structname=MockSegmentManager --inpackage
$(INSTALL_PATH)/mockery --name=CollectionManager --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_collection_manager.go --with-expecter --outpkg=segments --structname=MockCollectionManager --inpackage
$(INSTALL_PATH)/mockery --name=Loader --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_loader.go --with-expecter --outpkg=segments --structname=MockLoader --inpackage
$(INSTALL_PATH)/mockery --name=Segment --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_segment.go --with-expecter --outpkg=segments --structname=MockSegment --inpackage
$(INSTALL_PATH)/mockery --name=Worker --dir=$(PWD)/internal/querynodev2/cluster --output=$(PWD)/internal/querynodev2/cluster --filename=mock_worker.go --with-expecter --outpkg=worker --structname=MockWorker --inpackage
$(INSTALL_PATH)/mockery --name=ShardDelegator --dir=$(PWD)/internal/querynodev2/delegator/ --output=$(PWD)/internal/querynodev2/delegator/ --filename=mock_delegator.go --with-expecter --outpkg=delegator --structname=MockShardDelegator --inpackage
generate-mockery: getdeps
# internal/datanode
$(PWD)/bin/mockery --name=Allocator --dir=$(PWD)/internal/datanode/allocator/ --output=$(PWD)/internal/datanode/allocator --filename=mock_allocator.go --with-expecter --structname=MockAllocator --outpkg=allocator --inpackage
# internal/querycoordv2
$(PWD)/bin/mockery --name=QueryNodeServer --dir=$(PWD)/internal/proto/querypb/ --output=$(PWD)/internal/querycoordv2/mocks --filename=mock_querynode.go --with-expecter --structname=MockQueryNodeServer
$(PWD)/bin/mockery --name=Broker --dir=$(PWD)/internal/querycoordv2/meta --output=$(PWD)/internal/querycoordv2/meta --filename=mock_broker.go --with-expecter --structname=MockBroker --outpkg=meta
$(PWD)/bin/mockery --name=Scheduler --dir=$(PWD)/internal/querycoordv2/task --output=$(PWD)/internal/querycoordv2/task --filename=mock_scheduler.go --with-expecter --structname=MockScheduler --outpkg=task --inpackage
$(PWD)/bin/mockery --name=Cluster --dir=$(PWD)/internal/querycoordv2/session --output=$(PWD)/internal/querycoordv2/session --filename=mock_cluster.go --with-expecter --structname=MockCluster --outpkg=session --inpackage
$(PWD)/bin/mockery --name=Store --dir=$(PWD)/internal/querycoordv2/meta --output=$(PWD)/internal/querycoordv2/meta --filename=mock_store.go --with-expecter --structname=MockStore --outpkg=meta --inpackage
$(PWD)/bin/mockery --name=Balance --dir=$(PWD)/internal/querycoordv2/balance --output=$(PWD)/internal/querycoordv2/balance --filename=mock_balancer.go --with-expecter --structname=MockBalancer --outpkg=balance --inpackage
$(PWD)/bin/mockery --name=Controller --dir=$(PWD)/internal/querycoordv2/dist --output=$(PWD)/internal/querycoordv2/dist --filename=mock_controller.go --with-expecter --structname=MockController --outpkg=dist --inpackage
# internal/rootcoord
$(PWD)/bin/mockery --name=IMetaTable --dir=$(PWD)/internal/rootcoord --output=$(PWD)/internal/rootcoord/mocks --filename=meta_table.go --with-expecter --outpkg=mockrootcoord
$(PWD)/bin/mockery --name=GarbageCollector --dir=$(PWD)/internal/rootcoord --output=$(PWD)/internal/rootcoord/mocks --filename=garbage_collector.go --with-expecter --outpkg=mockrootcoord
#internal/types
$(PWD)/bin/mockery --name=QueryCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/types --filename=mock_querycoord.go --with-expecter --structname=MockQueryCoord --outpkg=types --inpackage
$(PWD)/bin/mockery --name=QueryNodeComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/types --filename=mock_querynode.go --with-expecter --structname=MockQueryNode --outpkg=types --inpackage
# internal/querynodev2
$(PWD)/bin/mockery --name=Manager --dir=$(PWD)/internal/querynodev2/cluster --output=$(PWD)/internal/querynodev2/cluster --filename=mock_manager.go --with-expecter --outpkg=cluster --structname=MockManager --inpackage
$(PWD)/bin/mockery --name=Loader --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_loader.go --with-expecter --outpkg=segments --structname=MockLoader --inpackage
$(PWD)/bin/mockery --name=SegmentManager --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_segment_manager.go --with-expecter --outpkg=segments --structname=MockSegmentManager --inpackage
$(PWD)/bin/mockery --name=Segment --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_segment.go --with-expecter --outpkg=segments --structname=MockSegment --inpackage
$(PWD)/bin/mockery --name=Worker --dir=$(PWD)/internal/querynodev2/cluster --output=$(PWD)/internal/querynodev2/cluster --filename=mock_worker.go --with-expecter --outpkg=worker --structname=MockWorker --inpackage
$(PWD)/bin/mockery --name=ShardDelegator --dir=$(PWD)/internal/querynodev2/delegator/ --output=$(PWD)/internal/querynodev2/delegator/ --filename=mock_delegator.go --with-expecter --outpkg=delegator --structname=MockShardDelegator --inpackage
# internal/datacoord
$(PWD)/bin/mockery --dir=internal/datacoord --name=compactionPlanContext --filename=mock_compaction_plan_context.go --output=internal/datacoord --structname=MockCompactionPlanContext --with-expecter --inpackage
$(PWD)/bin/mockery --dir=internal/datacoord --name=Handler --filename=mock_handler.go --output=internal/datacoord --structname=NMockHandler --with-expecter --inpackage
$(PWD)/bin/mockery --name=DataCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/types --filename=mock_datacoord.go --with-expecter --structname=MockDataCoord --outpkg=types --inpackage
#internal/proxy
$(PWD)/bin/mockery --name=LBPolicy --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_lb_policy.go --structname=MockLBPolicy --with-expecter --outpkg=proxy --inpackage
$(PWD)/bin/mockery --name=LBBalancer --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_lb_balancer.go --structname=MockLBBalancer --with-expecter --outpkg=proxy --inpackage
$(PWD)/bin/mockery --name=shardClientMgr --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_shardclient_manager.go --structname=MockShardClientManager --with-expecter --outpkg=proxy --inpackage
generate-mockery-datacoord: getdeps
$(INSTALL_PATH)/mockery --name=compactionPlanContext --dir=internal/datacoord --filename=mock_compaction_plan_context.go --output=internal/datacoord --structname=MockCompactionPlanContext --with-expecter --inpackage
$(INSTALL_PATH)/mockery --name=Handler --dir=internal/datacoord --filename=mock_handler.go --output=internal/datacoord --structname=NMockHandler --with-expecter --inpackage
$(INSTALL_PATH)/mockery --name=allocator --dir=internal/datacoord --filename=mock_allocator_test.go --output=internal/datacoord --structname=NMockAllocator --with-expecter --inpackage
generate-mockery-datanode: getdeps
$(INSTALL_PATH)/mockery --name=Allocator --dir=$(PWD)/internal/datanode/allocator --output=$(PWD)/internal/datanode/allocator --filename=mock_allocator.go --with-expecter --structname=MockAllocator --outpkg=allocator --inpackage
generate-mockery-metastore: getdeps
$(INSTALL_PATH)/mockery --name=RootCoordCatalog --dir=$(PWD)/internal/metastore --output=$(PWD)/internal/metastore/mocks --filename=mock_rootcoord_catalog.go --with-expecter --structname=RootCoordCatalog --outpkg=mocks
$(INSTALL_PATH)/mockery --name=DataCoordCatalog --dir=$(PWD)/internal/metastore --output=$(PWD)/internal/metastore/mocks --filename=mock_datacoord_catalog.go --with-expecter --structname=DataCoordCatalog --outpkg=mocks
$(INSTALL_PATH)/mockery --name=QueryCoordCatalog --dir=$(PWD)/internal/metastore --output=$(PWD)/internal/metastore/mocks --filename=mock_querycoord_catalog.go --with-expecter --structname=QueryCoordCatalog --outpkg=mocks
generate-mockery-utils: getdeps
# dependency.Factory
$(INSTALL_PATH)/mockery --name=Factory --dir=internal/util/dependency --output=internal/util/dependency --filename=mock_factory.go --with-expecter --structname=MockFactory --inpackage
# tso.Allocator
$(INSTALL_PATH)/mockery --name=Allocator --dir=internal/tso --output=internal/tso/mocks --filename=allocator.go --with-expecter --structname=Allocator --outpkg=mocktso
generate-mockery-kv: getdeps
$(INSTALL_PATH)/mockery --name=TxnKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=txn_kv.go --with-expecter
$(INSTALL_PATH)/mockery --name=MetaKv --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=meta_kv.go --with-expecter
$(INSTALL_PATH)/mockery --name=WatchKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=watch_kv.go --with-expecter
$(INSTALL_PATH)/mockery --name=SnapShotKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=snapshot_kv.go --with-expecter
generate-mockery-pkg:
$(MAKE) -C pkg generate-mockery
generate-mockery: generate-mockery-types generate-mockery-kv generate-mockery-rootcoord generate-mockery-proxy generate-mockery-querycoord generate-mockery-querynode generate-mockery-datacoord generate-mockery-pkg

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package datacoord
@ -26,13 +26,16 @@ func (_m *NMockAllocator) allocID(_a0 context.Context) (int64, error) {
ret := _m.Called(_a0)
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (int64, error)); ok {
return rf(_a0)
}
if rf, ok := ret.Get(0).(func(context.Context) int64); ok {
r0 = rf(_a0)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(_a0)
} else {
@ -65,18 +68,26 @@ func (_c *NMockAllocator_allocID_Call) Return(_a0 int64, _a1 error) *NMockAlloca
return _c
}
func (_c *NMockAllocator_allocID_Call) RunAndReturn(run func(context.Context) (int64, error)) *NMockAllocator_allocID_Call {
_c.Call.Return(run)
return _c
}
// allocTimestamp provides a mock function with given fields: _a0
func (_m *NMockAllocator) allocTimestamp(_a0 context.Context) (uint64, error) {
ret := _m.Called(_a0)
var r0 uint64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok {
return rf(_a0)
}
if rf, ok := ret.Get(0).(func(context.Context) uint64); ok {
r0 = rf(_a0)
} else {
r0 = ret.Get(0).(uint64)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(_a0)
} else {
@ -109,13 +120,17 @@ func (_c *NMockAllocator_allocTimestamp_Call) Return(_a0 uint64, _a1 error) *NMo
return _c
}
type mockConstructorTestingTNewNMockAllocator interface {
mock.TestingT
Cleanup(func())
func (_c *NMockAllocator_allocTimestamp_Call) RunAndReturn(run func(context.Context) (uint64, error)) *NMockAllocator_allocTimestamp_Call {
_c.Call.Return(run)
return _c
}
// NewNMockAllocator creates a new instance of NMockAllocator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewNMockAllocator(t mockConstructorTestingTNewNMockAllocator) *NMockAllocator {
// The first argument is typically a *testing.T value.
func NewNMockAllocator(t interface {
mock.TestingT
Cleanup(func())
}) *NMockAllocator {
mock := &NMockAllocator{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package datacoord
@ -40,8 +40,8 @@ type MockCompactionPlanContext_execCompactionPlan_Call struct {
}
// execCompactionPlan is a helper method to define mock.On call
// - signal *compactionSignal
// - plan *datapb.CompactionPlan
// - signal *compactionSignal
// - plan *datapb.CompactionPlan
func (_e *MockCompactionPlanContext_Expecter) execCompactionPlan(signal interface{}, plan interface{}) *MockCompactionPlanContext_execCompactionPlan_Call {
return &MockCompactionPlanContext_execCompactionPlan_Call{Call: _e.mock.On("execCompactionPlan", signal, plan)}
}
@ -58,6 +58,11 @@ func (_c *MockCompactionPlanContext_execCompactionPlan_Call) Return(_a0 error) *
return _c
}
func (_c *MockCompactionPlanContext_execCompactionPlan_Call) RunAndReturn(run func(*compactionSignal, *datapb.CompactionPlan) error) *MockCompactionPlanContext_execCompactionPlan_Call {
_c.Call.Return(run)
return _c
}
// getCompaction provides a mock function with given fields: planID
func (_m *MockCompactionPlanContext) getCompaction(planID int64) *compactionTask {
ret := _m.Called(planID)
@ -80,7 +85,7 @@ type MockCompactionPlanContext_getCompaction_Call struct {
}
// getCompaction is a helper method to define mock.On call
// - planID int64
// - planID int64
func (_e *MockCompactionPlanContext_Expecter) getCompaction(planID interface{}) *MockCompactionPlanContext_getCompaction_Call {
return &MockCompactionPlanContext_getCompaction_Call{Call: _e.mock.On("getCompaction", planID)}
}
@ -97,6 +102,11 @@ func (_c *MockCompactionPlanContext_getCompaction_Call) Return(_a0 *compactionTa
return _c
}
func (_c *MockCompactionPlanContext_getCompaction_Call) RunAndReturn(run func(int64) *compactionTask) *MockCompactionPlanContext_getCompaction_Call {
_c.Call.Return(run)
return _c
}
// getCompactionTasksBySignalID provides a mock function with given fields: signalID
func (_m *MockCompactionPlanContext) getCompactionTasksBySignalID(signalID int64) []*compactionTask {
ret := _m.Called(signalID)
@ -119,7 +129,7 @@ type MockCompactionPlanContext_getCompactionTasksBySignalID_Call struct {
}
// getCompactionTasksBySignalID is a helper method to define mock.On call
// - signalID int64
// - signalID int64
func (_e *MockCompactionPlanContext_Expecter) getCompactionTasksBySignalID(signalID interface{}) *MockCompactionPlanContext_getCompactionTasksBySignalID_Call {
return &MockCompactionPlanContext_getCompactionTasksBySignalID_Call{Call: _e.mock.On("getCompactionTasksBySignalID", signalID)}
}
@ -136,6 +146,11 @@ func (_c *MockCompactionPlanContext_getCompactionTasksBySignalID_Call) Return(_a
return _c
}
func (_c *MockCompactionPlanContext_getCompactionTasksBySignalID_Call) RunAndReturn(run func(int64) []*compactionTask) *MockCompactionPlanContext_getCompactionTasksBySignalID_Call {
_c.Call.Return(run)
return _c
}
// isFull provides a mock function with given fields:
func (_m *MockCompactionPlanContext) isFull() bool {
ret := _m.Called()
@ -172,6 +187,11 @@ func (_c *MockCompactionPlanContext_isFull_Call) Return(_a0 bool) *MockCompactio
return _c
}
func (_c *MockCompactionPlanContext_isFull_Call) RunAndReturn(run func() bool) *MockCompactionPlanContext_isFull_Call {
_c.Call.Return(run)
return _c
}
// start provides a mock function with given fields:
func (_m *MockCompactionPlanContext) start() {
_m.Called()
@ -199,6 +219,11 @@ func (_c *MockCompactionPlanContext_start_Call) Return() *MockCompactionPlanCont
return _c
}
func (_c *MockCompactionPlanContext_start_Call) RunAndReturn(run func()) *MockCompactionPlanContext_start_Call {
_c.Call.Return(run)
return _c
}
// stop provides a mock function with given fields:
func (_m *MockCompactionPlanContext) stop() {
_m.Called()
@ -226,6 +251,11 @@ func (_c *MockCompactionPlanContext_stop_Call) Return() *MockCompactionPlanConte
return _c
}
func (_c *MockCompactionPlanContext_stop_Call) RunAndReturn(run func()) *MockCompactionPlanContext_stop_Call {
_c.Call.Return(run)
return _c
}
// updateCompaction provides a mock function with given fields: ts
func (_m *MockCompactionPlanContext) updateCompaction(ts uint64) error {
ret := _m.Called(ts)
@ -246,7 +276,7 @@ type MockCompactionPlanContext_updateCompaction_Call struct {
}
// updateCompaction is a helper method to define mock.On call
// - ts uint64
// - ts uint64
func (_e *MockCompactionPlanContext_Expecter) updateCompaction(ts interface{}) *MockCompactionPlanContext_updateCompaction_Call {
return &MockCompactionPlanContext_updateCompaction_Call{Call: _e.mock.On("updateCompaction", ts)}
}
@ -263,13 +293,17 @@ func (_c *MockCompactionPlanContext_updateCompaction_Call) Return(_a0 error) *Mo
return _c
}
type mockConstructorTestingTNewMockCompactionPlanContext interface {
mock.TestingT
Cleanup(func())
func (_c *MockCompactionPlanContext_updateCompaction_Call) RunAndReturn(run func(uint64) error) *MockCompactionPlanContext_updateCompaction_Call {
_c.Call.Return(run)
return _c
}
// NewMockCompactionPlanContext creates a new instance of MockCompactionPlanContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockCompactionPlanContext(t mockConstructorTestingTNewMockCompactionPlanContext) *MockCompactionPlanContext {
// The first argument is typically a *testing.T value.
func NewMockCompactionPlanContext(t interface {
mock.TestingT
Cleanup(func())
}) *MockCompactionPlanContext {
mock := &MockCompactionPlanContext{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package datacoord
@ -42,8 +42,8 @@ type NMockHandler_CheckShouldDropChannel_Call struct {
}
// CheckShouldDropChannel is a helper method to define mock.On call
// - channel string
// - collectionID int64
// - channel string
// - collectionID int64
func (_e *NMockHandler_Expecter) CheckShouldDropChannel(channel interface{}, collectionID interface{}) *NMockHandler_CheckShouldDropChannel_Call {
return &NMockHandler_CheckShouldDropChannel_Call{Call: _e.mock.On("CheckShouldDropChannel", channel, collectionID)}
}
@ -60,6 +60,11 @@ func (_c *NMockHandler_CheckShouldDropChannel_Call) Return(_a0 bool) *NMockHandl
return _c
}
func (_c *NMockHandler_CheckShouldDropChannel_Call) RunAndReturn(run func(string, int64) bool) *NMockHandler_CheckShouldDropChannel_Call {
_c.Call.Return(run)
return _c
}
// FinishDropChannel provides a mock function with given fields: channel
func (_m *NMockHandler) FinishDropChannel(channel string) error {
ret := _m.Called(channel)
@ -80,7 +85,7 @@ type NMockHandler_FinishDropChannel_Call struct {
}
// FinishDropChannel is a helper method to define mock.On call
// - channel string
// - channel string
func (_e *NMockHandler_Expecter) FinishDropChannel(channel interface{}) *NMockHandler_FinishDropChannel_Call {
return &NMockHandler_FinishDropChannel_Call{Call: _e.mock.On("FinishDropChannel", channel)}
}
@ -97,11 +102,20 @@ func (_c *NMockHandler_FinishDropChannel_Call) Return(_a0 error) *NMockHandler_F
return _c
}
func (_c *NMockHandler_FinishDropChannel_Call) RunAndReturn(run func(string) error) *NMockHandler_FinishDropChannel_Call {
_c.Call.Return(run)
return _c
}
// GetCollection provides a mock function with given fields: ctx, collectionID
func (_m *NMockHandler) GetCollection(ctx context.Context, collectionID int64) (*collectionInfo, error) {
ret := _m.Called(ctx, collectionID)
var r0 *collectionInfo
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*collectionInfo, error)); ok {
return rf(ctx, collectionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *collectionInfo); ok {
r0 = rf(ctx, collectionID)
} else {
@ -110,7 +124,6 @@ func (_m *NMockHandler) GetCollection(ctx context.Context, collectionID int64) (
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, collectionID)
} else {
@ -126,8 +139,8 @@ type NMockHandler_GetCollection_Call struct {
}
// GetCollection is a helper method to define mock.On call
// - ctx context.Context
// - collectionID int64
// - ctx context.Context
// - collectionID int64
func (_e *NMockHandler_Expecter) GetCollection(ctx interface{}, collectionID interface{}) *NMockHandler_GetCollection_Call {
return &NMockHandler_GetCollection_Call{Call: _e.mock.On("GetCollection", ctx, collectionID)}
}
@ -144,6 +157,11 @@ func (_c *NMockHandler_GetCollection_Call) Return(_a0 *collectionInfo, _a1 error
return _c
}
func (_c *NMockHandler_GetCollection_Call) RunAndReturn(run func(context.Context, int64) (*collectionInfo, error)) *NMockHandler_GetCollection_Call {
_c.Call.Return(run)
return _c
}
// GetDataVChanPositions provides a mock function with given fields: ch, partitionID
func (_m *NMockHandler) GetDataVChanPositions(ch *channel, partitionID int64) *datapb.VchannelInfo {
ret := _m.Called(ch, partitionID)
@ -166,8 +184,8 @@ type NMockHandler_GetDataVChanPositions_Call struct {
}
// GetDataVChanPositions is a helper method to define mock.On call
// - ch *channel
// - partitionID int64
// - ch *channel
// - partitionID int64
func (_e *NMockHandler_Expecter) GetDataVChanPositions(ch interface{}, partitionID interface{}) *NMockHandler_GetDataVChanPositions_Call {
return &NMockHandler_GetDataVChanPositions_Call{Call: _e.mock.On("GetDataVChanPositions", ch, partitionID)}
}
@ -184,6 +202,11 @@ func (_c *NMockHandler_GetDataVChanPositions_Call) Return(_a0 *datapb.VchannelIn
return _c
}
func (_c *NMockHandler_GetDataVChanPositions_Call) RunAndReturn(run func(*channel, int64) *datapb.VchannelInfo) *NMockHandler_GetDataVChanPositions_Call {
_c.Call.Return(run)
return _c
}
// GetQueryVChanPositions provides a mock function with given fields: ch, partitionIDs
func (_m *NMockHandler) GetQueryVChanPositions(ch *channel, partitionIDs ...int64) *datapb.VchannelInfo {
_va := make([]interface{}, len(partitionIDs))
@ -213,8 +236,8 @@ type NMockHandler_GetQueryVChanPositions_Call struct {
}
// GetQueryVChanPositions is a helper method to define mock.On call
// - ch *channel
// - partitionIDs ...int64
// - ch *channel
// - partitionIDs ...int64
func (_e *NMockHandler_Expecter) GetQueryVChanPositions(ch interface{}, partitionIDs ...interface{}) *NMockHandler_GetQueryVChanPositions_Call {
return &NMockHandler_GetQueryVChanPositions_Call{Call: _e.mock.On("GetQueryVChanPositions",
append([]interface{}{ch}, partitionIDs...)...)}
@ -238,13 +261,17 @@ func (_c *NMockHandler_GetQueryVChanPositions_Call) Return(_a0 *datapb.VchannelI
return _c
}
type mockConstructorTestingTNewNMockHandler interface {
mock.TestingT
Cleanup(func())
func (_c *NMockHandler_GetQueryVChanPositions_Call) RunAndReturn(run func(*channel, ...int64) *datapb.VchannelInfo) *NMockHandler_GetQueryVChanPositions_Call {
_c.Call.Return(run)
return _c
}
// NewNMockHandler creates a new instance of NMockHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewNMockHandler(t mockConstructorTestingTNewNMockHandler) *NMockHandler {
// The first argument is typically a *testing.T value.
func NewNMockHandler(t interface {
mock.TestingT
Cleanup(func())
}) *NMockHandler {
mock := &NMockHandler{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks

View File

@ -1,595 +0,0 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
package mocks
import (
context "context"
milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
metastore "github.com/milvus-io/milvus/internal/metastore"
mock "github.com/stretchr/testify/mock"
model "github.com/milvus-io/milvus/internal/metastore/model"
)
// RootCoordCatalog is an autogenerated mock type for the RootCoordCatalog type
type RootCoordCatalog struct {
mock.Mock
}
// AlterAlias provides a mock function with given fields: ctx, alias, ts
func (_m *RootCoordCatalog) AlterAlias(ctx context.Context, alias *model.Alias, ts uint64) error {
ret := _m.Called(ctx, alias, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Alias, uint64) error); ok {
r0 = rf(ctx, alias, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// AlterCollection provides a mock function with given fields: ctx, oldColl, newColl, alterType, ts
func (_m *RootCoordCatalog) AlterCollection(ctx context.Context, oldColl *model.Collection, newColl *model.Collection, alterType metastore.AlterType, ts uint64) error {
ret := _m.Called(ctx, oldColl, newColl, alterType, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Collection, *model.Collection, metastore.AlterType, uint64) error); ok {
r0 = rf(ctx, oldColl, newColl, alterType, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// AlterCredential provides a mock function with given fields: ctx, credential
func (_m *RootCoordCatalog) AlterCredential(ctx context.Context, credential *model.Credential) error {
ret := _m.Called(ctx, credential)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Credential) error); ok {
r0 = rf(ctx, credential)
} else {
r0 = ret.Error(0)
}
return r0
}
// AlterGrant provides a mock function with given fields: ctx, tenant, entity, operateType
func (_m *RootCoordCatalog) AlterGrant(ctx context.Context, tenant string, entity *milvuspb.GrantEntity, operateType milvuspb.OperatePrivilegeType) error {
ret := _m.Called(ctx, tenant, entity, operateType)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.GrantEntity, milvuspb.OperatePrivilegeType) error); ok {
r0 = rf(ctx, tenant, entity, operateType)
} else {
r0 = ret.Error(0)
}
return r0
}
// AlterPartition provides a mock function with given fields: ctx, dbID, oldPart, newPart, alterType, ts
func (_m *RootCoordCatalog) AlterPartition(ctx context.Context, dbID int64, oldPart *model.Partition, newPart *model.Partition, alterType metastore.AlterType, ts uint64) error {
ret := _m.Called(ctx, dbID, oldPart, newPart, alterType, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *model.Partition, *model.Partition, metastore.AlterType, uint64) error); ok {
r0 = rf(ctx, dbID, oldPart, newPart, alterType, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// AlterUserRole provides a mock function with given fields: ctx, tenant, userEntity, roleEntity, operateType
func (_m *RootCoordCatalog) AlterUserRole(ctx context.Context, tenant string, userEntity *milvuspb.UserEntity, roleEntity *milvuspb.RoleEntity, operateType milvuspb.OperateUserRoleType) error {
ret := _m.Called(ctx, tenant, userEntity, roleEntity, operateType)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.UserEntity, *milvuspb.RoleEntity, milvuspb.OperateUserRoleType) error); ok {
r0 = rf(ctx, tenant, userEntity, roleEntity, operateType)
} else {
r0 = ret.Error(0)
}
return r0
}
// Close provides a mock function with given fields:
func (_m *RootCoordCatalog) Close() {
_m.Called()
}
// CollectionExists provides a mock function with given fields: ctx, dbID, collectionID, ts
func (_m *RootCoordCatalog) CollectionExists(ctx context.Context, dbID int64, collectionID int64, ts uint64) bool {
ret := _m.Called(ctx, dbID, collectionID, ts)
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, uint64) bool); ok {
r0 = rf(ctx, dbID, collectionID, ts)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// CreateAlias provides a mock function with given fields: ctx, alias, ts
func (_m *RootCoordCatalog) CreateAlias(ctx context.Context, alias *model.Alias, ts uint64) error {
ret := _m.Called(ctx, alias, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Alias, uint64) error); ok {
r0 = rf(ctx, alias, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateCollection provides a mock function with given fields: ctx, collectionInfo, ts
func (_m *RootCoordCatalog) CreateCollection(ctx context.Context, collectionInfo *model.Collection, ts uint64) error {
ret := _m.Called(ctx, collectionInfo, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Collection, uint64) error); ok {
r0 = rf(ctx, collectionInfo, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateCredential provides a mock function with given fields: ctx, credential
func (_m *RootCoordCatalog) CreateCredential(ctx context.Context, credential *model.Credential) error {
ret := _m.Called(ctx, credential)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Credential) error); ok {
r0 = rf(ctx, credential)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateDatabase provides a mock function with given fields: ctx, db, ts
func (_m *RootCoordCatalog) CreateDatabase(ctx context.Context, db *model.Database, ts uint64) error {
ret := _m.Called(ctx, db, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Database, uint64) error); ok {
r0 = rf(ctx, db, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreatePartition provides a mock function with given fields: ctx, dbID, partition, ts
func (_m *RootCoordCatalog) CreatePartition(ctx context.Context, dbID int64, partition *model.Partition, ts uint64) error {
ret := _m.Called(ctx, dbID, partition, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *model.Partition, uint64) error); ok {
r0 = rf(ctx, dbID, partition, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// CreateRole provides a mock function with given fields: ctx, tenant, entity
func (_m *RootCoordCatalog) CreateRole(ctx context.Context, tenant string, entity *milvuspb.RoleEntity) error {
ret := _m.Called(ctx, tenant, entity)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.RoleEntity) error); ok {
r0 = rf(ctx, tenant, entity)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteGrant provides a mock function with given fields: ctx, tenant, role
func (_m *RootCoordCatalog) DeleteGrant(ctx context.Context, tenant string, role *milvuspb.RoleEntity) error {
ret := _m.Called(ctx, tenant, role)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.RoleEntity) error); ok {
r0 = rf(ctx, tenant, role)
} else {
r0 = ret.Error(0)
}
return r0
}
// DropAlias provides a mock function with given fields: ctx, dbID, alias, ts
func (_m *RootCoordCatalog) DropAlias(ctx context.Context, dbID int64, alias string, ts uint64) error {
ret := _m.Called(ctx, dbID, alias, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string, uint64) error); ok {
r0 = rf(ctx, dbID, alias, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// DropCollection provides a mock function with given fields: ctx, collectionInfo, ts
func (_m *RootCoordCatalog) DropCollection(ctx context.Context, collectionInfo *model.Collection, ts uint64) error {
ret := _m.Called(ctx, collectionInfo, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Collection, uint64) error); ok {
r0 = rf(ctx, collectionInfo, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// DropCredential provides a mock function with given fields: ctx, username
func (_m *RootCoordCatalog) DropCredential(ctx context.Context, username string) error {
ret := _m.Called(ctx, username)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, username)
} else {
r0 = ret.Error(0)
}
return r0
}
// DropDatabase provides a mock function with given fields: ctx, dbID, ts
func (_m *RootCoordCatalog) DropDatabase(ctx context.Context, dbID int64, ts uint64) error {
ret := _m.Called(ctx, dbID, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) error); ok {
r0 = rf(ctx, dbID, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// DropPartition provides a mock function with given fields: ctx, dbID, collectionID, partitionID, ts
func (_m *RootCoordCatalog) DropPartition(ctx context.Context, dbID int64, collectionID int64, partitionID int64, ts uint64) error {
ret := _m.Called(ctx, dbID, collectionID, partitionID, ts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64, int64, int64, uint64) error); ok {
r0 = rf(ctx, dbID, collectionID, partitionID, ts)
} else {
r0 = ret.Error(0)
}
return r0
}
// DropRole provides a mock function with given fields: ctx, tenant, roleName
func (_m *RootCoordCatalog) DropRole(ctx context.Context, tenant string, roleName string) error {
ret := _m.Called(ctx, tenant, roleName)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, tenant, roleName)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetCollectionByID provides a mock function with given fields: ctx, dbID, ts, collectionID
func (_m *RootCoordCatalog) GetCollectionByID(ctx context.Context, dbID int64, ts uint64, collectionID int64) (*model.Collection, error) {
ret := _m.Called(ctx, dbID, ts, collectionID)
var r0 *model.Collection
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64, int64) *model.Collection); ok {
r0 = rf(ctx, dbID, ts, collectionID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Collection)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, uint64, int64) error); ok {
r1 = rf(ctx, dbID, ts, collectionID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCollectionByName provides a mock function with given fields: ctx, dbID, collectionName, ts
func (_m *RootCoordCatalog) GetCollectionByName(ctx context.Context, dbID int64, collectionName string, ts uint64) (*model.Collection, error) {
ret := _m.Called(ctx, dbID, collectionName, ts)
var r0 *model.Collection
if rf, ok := ret.Get(0).(func(context.Context, int64, string, uint64) *model.Collection); ok {
r0 = rf(ctx, dbID, collectionName, ts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Collection)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, string, uint64) error); ok {
r1 = rf(ctx, dbID, collectionName, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCredential provides a mock function with given fields: ctx, username
func (_m *RootCoordCatalog) GetCredential(ctx context.Context, username string) (*model.Credential, error) {
ret := _m.Called(ctx, username)
var r0 *model.Credential
if rf, ok := ret.Get(0).(func(context.Context, string) *model.Credential); ok {
r0 = rf(ctx, username)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.Credential)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, username)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListAliases provides a mock function with given fields: ctx, dbID, ts
func (_m *RootCoordCatalog) ListAliases(ctx context.Context, dbID int64, ts uint64) ([]*model.Alias, error) {
ret := _m.Called(ctx, dbID, ts)
var r0 []*model.Alias
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) []*model.Alias); ok {
r0 = rf(ctx, dbID, ts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Alias)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, uint64) error); ok {
r1 = rf(ctx, dbID, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListCollections provides a mock function with given fields: ctx, dbID, ts
func (_m *RootCoordCatalog) ListCollections(ctx context.Context, dbID int64, ts uint64) ([]*model.Collection, error) {
ret := _m.Called(ctx, dbID, ts)
var r0 []*model.Collection
if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) []*model.Collection); ok {
r0 = rf(ctx, dbID, ts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Collection)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, uint64) error); ok {
r1 = rf(ctx, dbID, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListCredentials provides a mock function with given fields: ctx
func (_m *RootCoordCatalog) ListCredentials(ctx context.Context) ([]string, error) {
ret := _m.Called(ctx)
var r0 []string
if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListDatabases provides a mock function with given fields: ctx, ts
func (_m *RootCoordCatalog) ListDatabases(ctx context.Context, ts uint64) ([]*model.Database, error) {
ret := _m.Called(ctx, ts)
var r0 []*model.Database
if rf, ok := ret.Get(0).(func(context.Context, uint64) []*model.Database); ok {
r0 = rf(ctx, ts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.Database)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
r1 = rf(ctx, ts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListGrant provides a mock function with given fields: ctx, tenant, entity
func (_m *RootCoordCatalog) ListGrant(ctx context.Context, tenant string, entity *milvuspb.GrantEntity) ([]*milvuspb.GrantEntity, error) {
ret := _m.Called(ctx, tenant, entity)
var r0 []*milvuspb.GrantEntity
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.GrantEntity) []*milvuspb.GrantEntity); ok {
r0 = rf(ctx, tenant, entity)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*milvuspb.GrantEntity)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, *milvuspb.GrantEntity) error); ok {
r1 = rf(ctx, tenant, entity)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListPolicy provides a mock function with given fields: ctx, tenant
func (_m *RootCoordCatalog) ListPolicy(ctx context.Context, tenant string) ([]string, error) {
ret := _m.Called(ctx, tenant)
var r0 []string
if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok {
r0 = rf(ctx, tenant)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, tenant)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListRole provides a mock function with given fields: ctx, tenant, entity, includeUserInfo
func (_m *RootCoordCatalog) ListRole(ctx context.Context, tenant string, entity *milvuspb.RoleEntity, includeUserInfo bool) ([]*milvuspb.RoleResult, error) {
ret := _m.Called(ctx, tenant, entity, includeUserInfo)
var r0 []*milvuspb.RoleResult
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.RoleEntity, bool) []*milvuspb.RoleResult); ok {
r0 = rf(ctx, tenant, entity, includeUserInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*milvuspb.RoleResult)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, *milvuspb.RoleEntity, bool) error); ok {
r1 = rf(ctx, tenant, entity, includeUserInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListUser provides a mock function with given fields: ctx, tenant, entity, includeRoleInfo
func (_m *RootCoordCatalog) ListUser(ctx context.Context, tenant string, entity *milvuspb.UserEntity, includeRoleInfo bool) ([]*milvuspb.UserResult, error) {
ret := _m.Called(ctx, tenant, entity, includeRoleInfo)
var r0 []*milvuspb.UserResult
if rf, ok := ret.Get(0).(func(context.Context, string, *milvuspb.UserEntity, bool) []*milvuspb.UserResult); ok {
r0 = rf(ctx, tenant, entity, includeRoleInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*milvuspb.UserResult)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, *milvuspb.UserEntity, bool) error); ok {
r1 = rf(ctx, tenant, entity, includeRoleInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListUserRole provides a mock function with given fields: ctx, tenant
func (_m *RootCoordCatalog) ListUserRole(ctx context.Context, tenant string) ([]string, error) {
ret := _m.Called(ctx, tenant)
var r0 []string
if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok {
r0 = rf(ctx, tenant)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, tenant)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewRootCoordCatalog interface {
mock.TestingT
Cleanup(func())
}
// NewRootCoordCatalog creates a new instance of RootCoordCatalog. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewRootCoordCatalog(t mockConstructorTestingTNewRootCoordCatalog) *RootCoordCatalog {
mock := &RootCoordCatalog{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
@ -71,49 +71,6 @@ func (_c *DataCoordCatalog_AddSegment_Call) RunAndReturn(run func(context.Contex
return _c
}
// AlterIndex provides a mock function with given fields: ctx, newIndex
func (_m *DataCoordCatalog) AlterIndex(ctx context.Context, newIndex *model.Index) error {
ret := _m.Called(ctx, newIndex)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Index) error); ok {
r0 = rf(ctx, newIndex)
} else {
r0 = ret.Error(0)
}
return r0
}
// DataCoordCatalog_AlterIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterIndex'
type DataCoordCatalog_AlterIndex_Call struct {
*mock.Call
}
// AlterIndex is a helper method to define mock.On call
// - ctx context.Context
// - newIndex *model.Index
func (_e *DataCoordCatalog_Expecter) AlterIndex(ctx interface{}, newIndex interface{}) *DataCoordCatalog_AlterIndex_Call {
return &DataCoordCatalog_AlterIndex_Call{Call: _e.mock.On("AlterIndex", ctx, newIndex)}
}
func (_c *DataCoordCatalog_AlterIndex_Call) Run(run func(ctx context.Context, newIndex *model.Index)) *DataCoordCatalog_AlterIndex_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*model.Index))
})
return _c
}
func (_c *DataCoordCatalog_AlterIndex_Call) Return(_a0 error) *DataCoordCatalog_AlterIndex_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *DataCoordCatalog_AlterIndex_Call) RunAndReturn(run func(context.Context, *model.Index) error) *DataCoordCatalog_AlterIndex_Call {
_c.Call.Return(run)
return _c
}
// AlterIndexes provides a mock function with given fields: ctx, newIndexes
func (_m *DataCoordCatalog) AlterIndexes(ctx context.Context, newIndexes []*model.Index) error {
ret := _m.Called(ctx, newIndexes)
@ -157,93 +114,6 @@ func (_c *DataCoordCatalog_AlterIndexes_Call) RunAndReturn(run func(context.Cont
return _c
}
// AlterSegment provides a mock function with given fields: ctx, newSegment, oldSegment
func (_m *DataCoordCatalog) AlterSegment(ctx context.Context, newSegment *datapb.SegmentInfo, oldSegment *datapb.SegmentInfo) error {
ret := _m.Called(ctx, newSegment, oldSegment)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *datapb.SegmentInfo, *datapb.SegmentInfo) error); ok {
r0 = rf(ctx, newSegment, oldSegment)
} else {
r0 = ret.Error(0)
}
return r0
}
// DataCoordCatalog_AlterSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterSegment'
type DataCoordCatalog_AlterSegment_Call struct {
*mock.Call
}
// AlterSegment is a helper method to define mock.On call
// - ctx context.Context
// - newSegment *datapb.SegmentInfo
// - oldSegment *datapb.SegmentInfo
func (_e *DataCoordCatalog_Expecter) AlterSegment(ctx interface{}, newSegment interface{}, oldSegment interface{}) *DataCoordCatalog_AlterSegment_Call {
return &DataCoordCatalog_AlterSegment_Call{Call: _e.mock.On("AlterSegment", ctx, newSegment, oldSegment)}
}
func (_c *DataCoordCatalog_AlterSegment_Call) Run(run func(ctx context.Context, newSegment *datapb.SegmentInfo, oldSegment *datapb.SegmentInfo)) *DataCoordCatalog_AlterSegment_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*datapb.SegmentInfo), args[2].(*datapb.SegmentInfo))
})
return _c
}
func (_c *DataCoordCatalog_AlterSegment_Call) Return(_a0 error) *DataCoordCatalog_AlterSegment_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *DataCoordCatalog_AlterSegment_Call) RunAndReturn(run func(context.Context, *datapb.SegmentInfo, *datapb.SegmentInfo) error) *DataCoordCatalog_AlterSegment_Call {
_c.Call.Return(run)
return _c
}
// AlterSegmentIndex provides a mock function with given fields: ctx, newSegIndex
func (_m *DataCoordCatalog) AlterSegmentIndex(ctx context.Context, newSegIndex *model.SegmentIndex) error {
ret := _m.Called(ctx, newSegIndex)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *model.SegmentIndex) error); ok {
r0 = rf(ctx, newSegIndex)
} else {
r0 = ret.Error(0)
}
return r0
}
// DataCoordCatalog_AlterSegmentIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterSegmentIndex'
type DataCoordCatalog_AlterSegmentIndex_Call struct {
*mock.Call
}
// AlterSegmentIndex is a helper method to define mock.On call
// - ctx context.Context
// - newSegIndex *model.SegmentIndex
func (_e *DataCoordCatalog_Expecter) AlterSegmentIndex(ctx interface{}, newSegIndex interface{}) *DataCoordCatalog_AlterSegmentIndex_Call {
return &DataCoordCatalog_AlterSegmentIndex_Call{Call: _e.mock.On("AlterSegmentIndex", ctx, newSegIndex)}
}
func (_c *DataCoordCatalog_AlterSegmentIndex_Call) Run(run func(ctx context.Context, newSegIndex *model.SegmentIndex)) *DataCoordCatalog_AlterSegmentIndex_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*model.SegmentIndex))
})
return _c
}
func (_c *DataCoordCatalog_AlterSegmentIndex_Call) Return(_a0 error) *DataCoordCatalog_AlterSegmentIndex_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *DataCoordCatalog_AlterSegmentIndex_Call) RunAndReturn(run func(context.Context, *model.SegmentIndex) error) *DataCoordCatalog_AlterSegmentIndex_Call {
_c.Call.Return(run)
return _c
}
// AlterSegmentIndexes provides a mock function with given fields: ctx, newSegIdxes
func (_m *DataCoordCatalog) AlterSegmentIndexes(ctx context.Context, newSegIdxes []*model.SegmentIndex) error {
ret := _m.Called(ctx, newSegIdxes)
@ -345,50 +215,6 @@ func (_c *DataCoordCatalog_AlterSegments_Call) RunAndReturn(run func(context.Con
return _c
}
// AlterSegmentsAndAddNewSegment provides a mock function with given fields: ctx, segments, newSegment
func (_m *DataCoordCatalog) AlterSegmentsAndAddNewSegment(ctx context.Context, segments []*datapb.SegmentInfo, newSegment *datapb.SegmentInfo) error {
ret := _m.Called(ctx, segments, newSegment)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, []*datapb.SegmentInfo, *datapb.SegmentInfo) error); ok {
r0 = rf(ctx, segments, newSegment)
} else {
r0 = ret.Error(0)
}
return r0
}
// DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterSegmentsAndAddNewSegment'
type DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call struct {
*mock.Call
}
// AlterSegmentsAndAddNewSegment is a helper method to define mock.On call
// - ctx context.Context
// - segments []*datapb.SegmentInfo
// - newSegment *datapb.SegmentInfo
func (_e *DataCoordCatalog_Expecter) AlterSegmentsAndAddNewSegment(ctx interface{}, segments interface{}, newSegment interface{}) *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call {
return &DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call{Call: _e.mock.On("AlterSegmentsAndAddNewSegment", ctx, segments, newSegment)}
}
func (_c *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call) Run(run func(ctx context.Context, segments []*datapb.SegmentInfo, newSegment *datapb.SegmentInfo)) *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].([]*datapb.SegmentInfo), args[2].(*datapb.SegmentInfo))
})
return _c
}
func (_c *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call) Return(_a0 error) *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call) RunAndReturn(run func(context.Context, []*datapb.SegmentInfo, *datapb.SegmentInfo) error) *DataCoordCatalog_AlterSegmentsAndAddNewSegment_Call {
_c.Call.Return(run)
return _c
}
// ChannelExists provides a mock function with given fields: ctx, channel
func (_m *DataCoordCatalog) ChannelExists(ctx context.Context, channel string) bool {
ret := _m.Called(ctx, channel)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.32.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
@ -66,8 +66,8 @@ type MockDataCoord_AssignSegmentID_Call struct {
}
// AssignSegmentID is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.AssignSegmentIDRequest
// - ctx context.Context
// - req *datapb.AssignSegmentIDRequest
func (_e *MockDataCoord_Expecter) AssignSegmentID(ctx interface{}, req interface{}) *MockDataCoord_AssignSegmentID_Call {
return &MockDataCoord_AssignSegmentID_Call{Call: _e.mock.On("AssignSegmentID", ctx, req)}
}
@ -121,8 +121,8 @@ type MockDataCoord_BroadcastAlteredCollection_Call struct {
}
// BroadcastAlteredCollection is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.AlterCollectionRequest
// - ctx context.Context
// - req *datapb.AlterCollectionRequest
func (_e *MockDataCoord_Expecter) BroadcastAlteredCollection(ctx interface{}, req interface{}) *MockDataCoord_BroadcastAlteredCollection_Call {
return &MockDataCoord_BroadcastAlteredCollection_Call{Call: _e.mock.On("BroadcastAlteredCollection", ctx, req)}
}
@ -176,8 +176,8 @@ type MockDataCoord_CheckHealth_Call struct {
}
// CheckHealth is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.CheckHealthRequest
// - ctx context.Context
// - req *milvuspb.CheckHealthRequest
func (_e *MockDataCoord_Expecter) CheckHealth(ctx interface{}, req interface{}) *MockDataCoord_CheckHealth_Call {
return &MockDataCoord_CheckHealth_Call{Call: _e.mock.On("CheckHealth", ctx, req)}
}
@ -231,8 +231,8 @@ type MockDataCoord_CreateIndex_Call struct {
}
// CreateIndex is a helper method to define mock.On call
// - ctx context.Context
// - req *indexpb.CreateIndexRequest
// - ctx context.Context
// - req *indexpb.CreateIndexRequest
func (_e *MockDataCoord_Expecter) CreateIndex(ctx interface{}, req interface{}) *MockDataCoord_CreateIndex_Call {
return &MockDataCoord_CreateIndex_Call{Call: _e.mock.On("CreateIndex", ctx, req)}
}
@ -286,8 +286,8 @@ type MockDataCoord_DescribeIndex_Call struct {
}
// DescribeIndex is a helper method to define mock.On call
// - ctx context.Context
// - req *indexpb.DescribeIndexRequest
// - ctx context.Context
// - req *indexpb.DescribeIndexRequest
func (_e *MockDataCoord_Expecter) DescribeIndex(ctx interface{}, req interface{}) *MockDataCoord_DescribeIndex_Call {
return &MockDataCoord_DescribeIndex_Call{Call: _e.mock.On("DescribeIndex", ctx, req)}
}
@ -341,8 +341,8 @@ type MockDataCoord_DropIndex_Call struct {
}
// DropIndex is a helper method to define mock.On call
// - ctx context.Context
// - req *indexpb.DropIndexRequest
// - ctx context.Context
// - req *indexpb.DropIndexRequest
func (_e *MockDataCoord_Expecter) DropIndex(ctx interface{}, req interface{}) *MockDataCoord_DropIndex_Call {
return &MockDataCoord_DropIndex_Call{Call: _e.mock.On("DropIndex", ctx, req)}
}
@ -396,8 +396,8 @@ type MockDataCoord_DropVirtualChannel_Call struct {
}
// DropVirtualChannel is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.DropVirtualChannelRequest
// - ctx context.Context
// - req *datapb.DropVirtualChannelRequest
func (_e *MockDataCoord_Expecter) DropVirtualChannel(ctx interface{}, req interface{}) *MockDataCoord_DropVirtualChannel_Call {
return &MockDataCoord_DropVirtualChannel_Call{Call: _e.mock.On("DropVirtualChannel", ctx, req)}
}
@ -451,8 +451,8 @@ type MockDataCoord_Flush_Call struct {
}
// Flush is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.FlushRequest
// - ctx context.Context
// - req *datapb.FlushRequest
func (_e *MockDataCoord_Expecter) Flush(ctx interface{}, req interface{}) *MockDataCoord_Flush_Call {
return &MockDataCoord_Flush_Call{Call: _e.mock.On("Flush", ctx, req)}
}
@ -506,8 +506,8 @@ type MockDataCoord_GcConfirm_Call struct {
}
// GcConfirm is a helper method to define mock.On call
// - ctx context.Context
// - request *datapb.GcConfirmRequest
// - ctx context.Context
// - request *datapb.GcConfirmRequest
func (_e *MockDataCoord_Expecter) GcConfirm(ctx interface{}, request interface{}) *MockDataCoord_GcConfirm_Call {
return &MockDataCoord_GcConfirm_Call{Call: _e.mock.On("GcConfirm", ctx, request)}
}
@ -561,8 +561,8 @@ type MockDataCoord_GetCollectionStatistics_Call struct {
}
// GetCollectionStatistics is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetCollectionStatisticsRequest
// - ctx context.Context
// - req *datapb.GetCollectionStatisticsRequest
func (_e *MockDataCoord_Expecter) GetCollectionStatistics(ctx interface{}, req interface{}) *MockDataCoord_GetCollectionStatistics_Call {
return &MockDataCoord_GetCollectionStatistics_Call{Call: _e.mock.On("GetCollectionStatistics", ctx, req)}
}
@ -616,8 +616,8 @@ type MockDataCoord_GetCompactionState_Call struct {
}
// GetCompactionState is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetCompactionStateRequest
// - ctx context.Context
// - req *milvuspb.GetCompactionStateRequest
func (_e *MockDataCoord_Expecter) GetCompactionState(ctx interface{}, req interface{}) *MockDataCoord_GetCompactionState_Call {
return &MockDataCoord_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", ctx, req)}
}
@ -671,8 +671,8 @@ type MockDataCoord_GetCompactionStateWithPlans_Call struct {
}
// GetCompactionStateWithPlans is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetCompactionPlansRequest
// - ctx context.Context
// - req *milvuspb.GetCompactionPlansRequest
func (_e *MockDataCoord_Expecter) GetCompactionStateWithPlans(ctx interface{}, req interface{}) *MockDataCoord_GetCompactionStateWithPlans_Call {
return &MockDataCoord_GetCompactionStateWithPlans_Call{Call: _e.mock.On("GetCompactionStateWithPlans", ctx, req)}
}
@ -726,7 +726,7 @@ type MockDataCoord_GetComponentStates_Call struct {
}
// GetComponentStates is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockDataCoord_Expecter) GetComponentStates(ctx interface{}) *MockDataCoord_GetComponentStates_Call {
return &MockDataCoord_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", ctx)}
}
@ -780,8 +780,8 @@ type MockDataCoord_GetFlushAllState_Call struct {
}
// GetFlushAllState is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetFlushAllStateRequest
// - ctx context.Context
// - req *milvuspb.GetFlushAllStateRequest
func (_e *MockDataCoord_Expecter) GetFlushAllState(ctx interface{}, req interface{}) *MockDataCoord_GetFlushAllState_Call {
return &MockDataCoord_GetFlushAllState_Call{Call: _e.mock.On("GetFlushAllState", ctx, req)}
}
@ -835,8 +835,8 @@ type MockDataCoord_GetFlushState_Call struct {
}
// GetFlushState is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetFlushStateRequest
// - ctx context.Context
// - req *milvuspb.GetFlushStateRequest
func (_e *MockDataCoord_Expecter) GetFlushState(ctx interface{}, req interface{}) *MockDataCoord_GetFlushState_Call {
return &MockDataCoord_GetFlushState_Call{Call: _e.mock.On("GetFlushState", ctx, req)}
}
@ -890,8 +890,8 @@ type MockDataCoord_GetFlushedSegments_Call struct {
}
// GetFlushedSegments is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetFlushedSegmentsRequest
// - ctx context.Context
// - req *datapb.GetFlushedSegmentsRequest
func (_e *MockDataCoord_Expecter) GetFlushedSegments(ctx interface{}, req interface{}) *MockDataCoord_GetFlushedSegments_Call {
return &MockDataCoord_GetFlushedSegments_Call{Call: _e.mock.On("GetFlushedSegments", ctx, req)}
}
@ -945,8 +945,8 @@ type MockDataCoord_GetIndexBuildProgress_Call struct {
}
// GetIndexBuildProgress is a helper method to define mock.On call
// - ctx context.Context
// - req *indexpb.GetIndexBuildProgressRequest
// - ctx context.Context
// - req *indexpb.GetIndexBuildProgressRequest
func (_e *MockDataCoord_Expecter) GetIndexBuildProgress(ctx interface{}, req interface{}) *MockDataCoord_GetIndexBuildProgress_Call {
return &MockDataCoord_GetIndexBuildProgress_Call{Call: _e.mock.On("GetIndexBuildProgress", ctx, req)}
}
@ -1000,8 +1000,8 @@ type MockDataCoord_GetIndexInfos_Call struct {
}
// GetIndexInfos is a helper method to define mock.On call
// - ctx context.Context
// - req *indexpb.GetIndexInfoRequest
// - ctx context.Context
// - req *indexpb.GetIndexInfoRequest
func (_e *MockDataCoord_Expecter) GetIndexInfos(ctx interface{}, req interface{}) *MockDataCoord_GetIndexInfos_Call {
return &MockDataCoord_GetIndexInfos_Call{Call: _e.mock.On("GetIndexInfos", ctx, req)}
}
@ -1055,8 +1055,8 @@ type MockDataCoord_GetIndexState_Call struct {
}
// GetIndexState is a helper method to define mock.On call
// - ctx context.Context
// - req *indexpb.GetIndexStateRequest
// - ctx context.Context
// - req *indexpb.GetIndexStateRequest
func (_e *MockDataCoord_Expecter) GetIndexState(ctx interface{}, req interface{}) *MockDataCoord_GetIndexState_Call {
return &MockDataCoord_GetIndexState_Call{Call: _e.mock.On("GetIndexState", ctx, req)}
}
@ -1110,8 +1110,8 @@ type MockDataCoord_GetIndexStatistics_Call struct {
}
// GetIndexStatistics is a helper method to define mock.On call
// - ctx context.Context
// - req *indexpb.GetIndexStatisticsRequest
// - ctx context.Context
// - req *indexpb.GetIndexStatisticsRequest
func (_e *MockDataCoord_Expecter) GetIndexStatistics(ctx interface{}, req interface{}) *MockDataCoord_GetIndexStatistics_Call {
return &MockDataCoord_GetIndexStatistics_Call{Call: _e.mock.On("GetIndexStatistics", ctx, req)}
}
@ -1165,8 +1165,8 @@ type MockDataCoord_GetInsertBinlogPaths_Call struct {
}
// GetInsertBinlogPaths is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetInsertBinlogPathsRequest
// - ctx context.Context
// - req *datapb.GetInsertBinlogPathsRequest
func (_e *MockDataCoord_Expecter) GetInsertBinlogPaths(ctx interface{}, req interface{}) *MockDataCoord_GetInsertBinlogPaths_Call {
return &MockDataCoord_GetInsertBinlogPaths_Call{Call: _e.mock.On("GetInsertBinlogPaths", ctx, req)}
}
@ -1220,8 +1220,8 @@ type MockDataCoord_GetMetrics_Call struct {
}
// GetMetrics is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetMetricsRequest
// - ctx context.Context
// - req *milvuspb.GetMetricsRequest
func (_e *MockDataCoord_Expecter) GetMetrics(ctx interface{}, req interface{}) *MockDataCoord_GetMetrics_Call {
return &MockDataCoord_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, req)}
}
@ -1275,8 +1275,8 @@ type MockDataCoord_GetPartitionStatistics_Call struct {
}
// GetPartitionStatistics is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetPartitionStatisticsRequest
// - ctx context.Context
// - req *datapb.GetPartitionStatisticsRequest
func (_e *MockDataCoord_Expecter) GetPartitionStatistics(ctx interface{}, req interface{}) *MockDataCoord_GetPartitionStatistics_Call {
return &MockDataCoord_GetPartitionStatistics_Call{Call: _e.mock.On("GetPartitionStatistics", ctx, req)}
}
@ -1330,8 +1330,8 @@ type MockDataCoord_GetRecoveryInfo_Call struct {
}
// GetRecoveryInfo is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetRecoveryInfoRequest
// - ctx context.Context
// - req *datapb.GetRecoveryInfoRequest
func (_e *MockDataCoord_Expecter) GetRecoveryInfo(ctx interface{}, req interface{}) *MockDataCoord_GetRecoveryInfo_Call {
return &MockDataCoord_GetRecoveryInfo_Call{Call: _e.mock.On("GetRecoveryInfo", ctx, req)}
}
@ -1385,8 +1385,8 @@ type MockDataCoord_GetRecoveryInfoV2_Call struct {
}
// GetRecoveryInfoV2 is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetRecoveryInfoRequestV2
// - ctx context.Context
// - req *datapb.GetRecoveryInfoRequestV2
func (_e *MockDataCoord_Expecter) GetRecoveryInfoV2(ctx interface{}, req interface{}) *MockDataCoord_GetRecoveryInfoV2_Call {
return &MockDataCoord_GetRecoveryInfoV2_Call{Call: _e.mock.On("GetRecoveryInfoV2", ctx, req)}
}
@ -1440,8 +1440,8 @@ type MockDataCoord_GetSegmentIndexState_Call struct {
}
// GetSegmentIndexState is a helper method to define mock.On call
// - ctx context.Context
// - req *indexpb.GetSegmentIndexStateRequest
// - ctx context.Context
// - req *indexpb.GetSegmentIndexStateRequest
func (_e *MockDataCoord_Expecter) GetSegmentIndexState(ctx interface{}, req interface{}) *MockDataCoord_GetSegmentIndexState_Call {
return &MockDataCoord_GetSegmentIndexState_Call{Call: _e.mock.On("GetSegmentIndexState", ctx, req)}
}
@ -1495,8 +1495,8 @@ type MockDataCoord_GetSegmentInfo_Call struct {
}
// GetSegmentInfo is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetSegmentInfoRequest
// - ctx context.Context
// - req *datapb.GetSegmentInfoRequest
func (_e *MockDataCoord_Expecter) GetSegmentInfo(ctx interface{}, req interface{}) *MockDataCoord_GetSegmentInfo_Call {
return &MockDataCoord_GetSegmentInfo_Call{Call: _e.mock.On("GetSegmentInfo", ctx, req)}
}
@ -1550,7 +1550,7 @@ type MockDataCoord_GetSegmentInfoChannel_Call struct {
}
// GetSegmentInfoChannel is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockDataCoord_Expecter) GetSegmentInfoChannel(ctx interface{}) *MockDataCoord_GetSegmentInfoChannel_Call {
return &MockDataCoord_GetSegmentInfoChannel_Call{Call: _e.mock.On("GetSegmentInfoChannel", ctx)}
}
@ -1604,8 +1604,8 @@ type MockDataCoord_GetSegmentStates_Call struct {
}
// GetSegmentStates is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetSegmentStatesRequest
// - ctx context.Context
// - req *datapb.GetSegmentStatesRequest
func (_e *MockDataCoord_Expecter) GetSegmentStates(ctx interface{}, req interface{}) *MockDataCoord_GetSegmentStates_Call {
return &MockDataCoord_GetSegmentStates_Call{Call: _e.mock.On("GetSegmentStates", ctx, req)}
}
@ -1659,8 +1659,8 @@ type MockDataCoord_GetSegmentsByStates_Call struct {
}
// GetSegmentsByStates is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.GetSegmentsByStatesRequest
// - ctx context.Context
// - req *datapb.GetSegmentsByStatesRequest
func (_e *MockDataCoord_Expecter) GetSegmentsByStates(ctx interface{}, req interface{}) *MockDataCoord_GetSegmentsByStates_Call {
return &MockDataCoord_GetSegmentsByStates_Call{Call: _e.mock.On("GetSegmentsByStates", ctx, req)}
}
@ -1714,7 +1714,7 @@ type MockDataCoord_GetStatisticsChannel_Call struct {
}
// GetStatisticsChannel is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockDataCoord_Expecter) GetStatisticsChannel(ctx interface{}) *MockDataCoord_GetStatisticsChannel_Call {
return &MockDataCoord_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", ctx)}
}
@ -1768,7 +1768,7 @@ type MockDataCoord_GetTimeTickChannel_Call struct {
}
// GetTimeTickChannel is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockDataCoord_Expecter) GetTimeTickChannel(ctx interface{}) *MockDataCoord_GetTimeTickChannel_Call {
return &MockDataCoord_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", ctx)}
}
@ -1822,8 +1822,8 @@ type MockDataCoord_Import_Call struct {
}
// Import is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.ImportTaskRequest
// - ctx context.Context
// - req *datapb.ImportTaskRequest
func (_e *MockDataCoord_Expecter) Import(ctx interface{}, req interface{}) *MockDataCoord_Import_Call {
return &MockDataCoord_Import_Call{Call: _e.mock.On("Import", ctx, req)}
}
@ -1918,8 +1918,8 @@ type MockDataCoord_ManualCompaction_Call struct {
}
// ManualCompaction is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ManualCompactionRequest
// - ctx context.Context
// - req *milvuspb.ManualCompactionRequest
func (_e *MockDataCoord_Expecter) ManualCompaction(ctx interface{}, req interface{}) *MockDataCoord_ManualCompaction_Call {
return &MockDataCoord_ManualCompaction_Call{Call: _e.mock.On("ManualCompaction", ctx, req)}
}
@ -1973,8 +1973,8 @@ type MockDataCoord_MarkSegmentsDropped_Call struct {
}
// MarkSegmentsDropped is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.MarkSegmentsDroppedRequest
// - ctx context.Context
// - req *datapb.MarkSegmentsDroppedRequest
func (_e *MockDataCoord_Expecter) MarkSegmentsDropped(ctx interface{}, req interface{}) *MockDataCoord_MarkSegmentsDropped_Call {
return &MockDataCoord_MarkSegmentsDropped_Call{Call: _e.mock.On("MarkSegmentsDropped", ctx, req)}
}
@ -2069,8 +2069,8 @@ type MockDataCoord_ReportDataNodeTtMsgs_Call struct {
}
// ReportDataNodeTtMsgs is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.ReportDataNodeTtMsgsRequest
// - ctx context.Context
// - req *datapb.ReportDataNodeTtMsgsRequest
func (_e *MockDataCoord_Expecter) ReportDataNodeTtMsgs(ctx interface{}, req interface{}) *MockDataCoord_ReportDataNodeTtMsgs_Call {
return &MockDataCoord_ReportDataNodeTtMsgs_Call{Call: _e.mock.On("ReportDataNodeTtMsgs", ctx, req)}
}
@ -2124,8 +2124,8 @@ type MockDataCoord_SaveBinlogPaths_Call struct {
}
// SaveBinlogPaths is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.SaveBinlogPathsRequest
// - ctx context.Context
// - req *datapb.SaveBinlogPathsRequest
func (_e *MockDataCoord_Expecter) SaveBinlogPaths(ctx interface{}, req interface{}) *MockDataCoord_SaveBinlogPaths_Call {
return &MockDataCoord_SaveBinlogPaths_Call{Call: _e.mock.On("SaveBinlogPaths", ctx, req)}
}
@ -2179,8 +2179,8 @@ type MockDataCoord_SaveImportSegment_Call struct {
}
// SaveImportSegment is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.SaveImportSegmentRequest
// - ctx context.Context
// - req *datapb.SaveImportSegmentRequest
func (_e *MockDataCoord_Expecter) SaveImportSegment(ctx interface{}, req interface{}) *MockDataCoord_SaveImportSegment_Call {
return &MockDataCoord_SaveImportSegment_Call{Call: _e.mock.On("SaveImportSegment", ctx, req)}
}
@ -2213,7 +2213,7 @@ type MockDataCoord_SetAddress_Call struct {
}
// SetAddress is a helper method to define mock.On call
// - address string
// - address string
func (_e *MockDataCoord_Expecter) SetAddress(address interface{}) *MockDataCoord_SetAddress_Call {
return &MockDataCoord_SetAddress_Call{Call: _e.mock.On("SetAddress", address)}
}
@ -2246,7 +2246,7 @@ type MockDataCoord_SetDataNodeCreator_Call struct {
}
// SetDataNodeCreator is a helper method to define mock.On call
// - _a0 func(context.Context , string , int64)(types.DataNode , error)
// - _a0 func(context.Context , string , int64)(types.DataNode , error)
func (_e *MockDataCoord_Expecter) SetDataNodeCreator(_a0 interface{}) *MockDataCoord_SetDataNodeCreator_Call {
return &MockDataCoord_SetDataNodeCreator_Call{Call: _e.mock.On("SetDataNodeCreator", _a0)}
}
@ -2279,7 +2279,7 @@ type MockDataCoord_SetEtcdClient_Call struct {
}
// SetEtcdClient is a helper method to define mock.On call
// - etcdClient *clientv3.Client
// - etcdClient *clientv3.Client
func (_e *MockDataCoord_Expecter) SetEtcdClient(etcdClient interface{}) *MockDataCoord_SetEtcdClient_Call {
return &MockDataCoord_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)}
}
@ -2312,7 +2312,7 @@ type MockDataCoord_SetIndexNodeCreator_Call struct {
}
// SetIndexNodeCreator is a helper method to define mock.On call
// - _a0 func(context.Context , string , int64)(types.IndexNode , error)
// - _a0 func(context.Context , string , int64)(types.IndexNode , error)
func (_e *MockDataCoord_Expecter) SetIndexNodeCreator(_a0 interface{}) *MockDataCoord_SetIndexNodeCreator_Call {
return &MockDataCoord_SetIndexNodeCreator_Call{Call: _e.mock.On("SetIndexNodeCreator", _a0)}
}
@ -2345,7 +2345,7 @@ type MockDataCoord_SetRootCoord_Call struct {
}
// SetRootCoord is a helper method to define mock.On call
// - rootCoord types.RootCoord
// - rootCoord types.RootCoord
func (_e *MockDataCoord_Expecter) SetRootCoord(rootCoord interface{}) *MockDataCoord_SetRootCoord_Call {
return &MockDataCoord_SetRootCoord_Call{Call: _e.mock.On("SetRootCoord", rootCoord)}
}
@ -2399,8 +2399,8 @@ type MockDataCoord_SetSegmentState_Call struct {
}
// SetSegmentState is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.SetSegmentStateRequest
// - ctx context.Context
// - req *datapb.SetSegmentStateRequest
func (_e *MockDataCoord_Expecter) SetSegmentState(ctx interface{}, req interface{}) *MockDataCoord_SetSegmentState_Call {
return &MockDataCoord_SetSegmentState_Call{Call: _e.mock.On("SetSegmentState", ctx, req)}
}
@ -2454,8 +2454,8 @@ type MockDataCoord_ShowConfigurations_Call struct {
}
// ShowConfigurations is a helper method to define mock.On call
// - ctx context.Context
// - req *internalpb.ShowConfigurationsRequest
// - ctx context.Context
// - req *internalpb.ShowConfigurationsRequest
func (_e *MockDataCoord_Expecter) ShowConfigurations(ctx interface{}, req interface{}) *MockDataCoord_ShowConfigurations_Call {
return &MockDataCoord_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", ctx, req)}
}
@ -2591,8 +2591,8 @@ type MockDataCoord_UnsetIsImportingState_Call struct {
}
// UnsetIsImportingState is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.UnsetIsImportingStateRequest
// - ctx context.Context
// - req *datapb.UnsetIsImportingStateRequest
func (_e *MockDataCoord_Expecter) UnsetIsImportingState(ctx interface{}, req interface{}) *MockDataCoord_UnsetIsImportingState_Call {
return &MockDataCoord_UnsetIsImportingState_Call{Call: _e.mock.On("UnsetIsImportingState", ctx, req)}
}
@ -2646,8 +2646,8 @@ type MockDataCoord_UpdateChannelCheckpoint_Call struct {
}
// UpdateChannelCheckpoint is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.UpdateChannelCheckpointRequest
// - ctx context.Context
// - req *datapb.UpdateChannelCheckpointRequest
func (_e *MockDataCoord_Expecter) UpdateChannelCheckpoint(ctx interface{}, req interface{}) *MockDataCoord_UpdateChannelCheckpoint_Call {
return &MockDataCoord_UpdateChannelCheckpoint_Call{Call: _e.mock.On("UpdateChannelCheckpoint", ctx, req)}
}
@ -2701,8 +2701,8 @@ type MockDataCoord_UpdateSegmentStatistics_Call struct {
}
// UpdateSegmentStatistics is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.UpdateSegmentStatisticsRequest
// - ctx context.Context
// - req *datapb.UpdateSegmentStatisticsRequest
func (_e *MockDataCoord_Expecter) UpdateSegmentStatistics(ctx interface{}, req interface{}) *MockDataCoord_UpdateSegmentStatistics_Call {
return &MockDataCoord_UpdateSegmentStatistics_Call{Call: _e.mock.On("UpdateSegmentStatistics", ctx, req)}
}
@ -2756,8 +2756,8 @@ type MockDataCoord_WatchChannels_Call struct {
}
// WatchChannels is a helper method to define mock.On call
// - ctx context.Context
// - req *datapb.WatchChannelsRequest
// - ctx context.Context
// - req *datapb.WatchChannelsRequest
func (_e *MockDataCoord_Expecter) WatchChannels(ctx interface{}, req interface{}) *MockDataCoord_WatchChannels_Call {
return &MockDataCoord_WatchChannels_Call{Call: _e.mock.On("WatchChannels", ctx, req)}
}

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks

View File

@ -0,0 +1,787 @@
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
import (
context "context"
commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
clientv3 "go.etcd.io/etcd/client/v3"
indexpb "github.com/milvus-io/milvus/internal/proto/indexpb"
internalpb "github.com/milvus-io/milvus/internal/proto/internalpb"
milvuspb "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
mock "github.com/stretchr/testify/mock"
)
// MockIndexNode is an autogenerated mock type for the IndexNodeComponent type
type MockIndexNode struct {
mock.Mock
}
type MockIndexNode_Expecter struct {
mock *mock.Mock
}
func (_m *MockIndexNode) EXPECT() *MockIndexNode_Expecter {
return &MockIndexNode_Expecter{mock: &_m.Mock}
}
// CreateJob provides a mock function with given fields: _a0, _a1
func (_m *MockIndexNode) CreateJob(_a0 context.Context, _a1 *indexpb.CreateJobRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *indexpb.CreateJobRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *indexpb.CreateJobRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*commonpb.Status)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *indexpb.CreateJobRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockIndexNode_CreateJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateJob'
type MockIndexNode_CreateJob_Call struct {
*mock.Call
}
// CreateJob is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *indexpb.CreateJobRequest
func (_e *MockIndexNode_Expecter) CreateJob(_a0 interface{}, _a1 interface{}) *MockIndexNode_CreateJob_Call {
return &MockIndexNode_CreateJob_Call{Call: _e.mock.On("CreateJob", _a0, _a1)}
}
func (_c *MockIndexNode_CreateJob_Call) Run(run func(_a0 context.Context, _a1 *indexpb.CreateJobRequest)) *MockIndexNode_CreateJob_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*indexpb.CreateJobRequest))
})
return _c
}
func (_c *MockIndexNode_CreateJob_Call) Return(_a0 *commonpb.Status, _a1 error) *MockIndexNode_CreateJob_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockIndexNode_CreateJob_Call) RunAndReturn(run func(context.Context, *indexpb.CreateJobRequest) (*commonpb.Status, error)) *MockIndexNode_CreateJob_Call {
_c.Call.Return(run)
return _c
}
// DropJobs provides a mock function with given fields: _a0, _a1
func (_m *MockIndexNode) DropJobs(_a0 context.Context, _a1 *indexpb.DropJobsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *indexpb.DropJobsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *indexpb.DropJobsRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*commonpb.Status)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *indexpb.DropJobsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockIndexNode_DropJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropJobs'
type MockIndexNode_DropJobs_Call struct {
*mock.Call
}
// DropJobs is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *indexpb.DropJobsRequest
func (_e *MockIndexNode_Expecter) DropJobs(_a0 interface{}, _a1 interface{}) *MockIndexNode_DropJobs_Call {
return &MockIndexNode_DropJobs_Call{Call: _e.mock.On("DropJobs", _a0, _a1)}
}
func (_c *MockIndexNode_DropJobs_Call) Run(run func(_a0 context.Context, _a1 *indexpb.DropJobsRequest)) *MockIndexNode_DropJobs_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*indexpb.DropJobsRequest))
})
return _c
}
func (_c *MockIndexNode_DropJobs_Call) Return(_a0 *commonpb.Status, _a1 error) *MockIndexNode_DropJobs_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockIndexNode_DropJobs_Call) RunAndReturn(run func(context.Context, *indexpb.DropJobsRequest) (*commonpb.Status, error)) *MockIndexNode_DropJobs_Call {
_c.Call.Return(run)
return _c
}
// GetAddress provides a mock function with given fields:
func (_m *MockIndexNode) GetAddress() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// MockIndexNode_GetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddress'
type MockIndexNode_GetAddress_Call struct {
*mock.Call
}
// GetAddress is a helper method to define mock.On call
func (_e *MockIndexNode_Expecter) GetAddress() *MockIndexNode_GetAddress_Call {
return &MockIndexNode_GetAddress_Call{Call: _e.mock.On("GetAddress")}
}
func (_c *MockIndexNode_GetAddress_Call) Run(run func()) *MockIndexNode_GetAddress_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockIndexNode_GetAddress_Call) Return(_a0 string) *MockIndexNode_GetAddress_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockIndexNode_GetAddress_Call) RunAndReturn(run func() string) *MockIndexNode_GetAddress_Call {
_c.Call.Return(run)
return _c
}
// GetComponentStates provides a mock function with given fields: ctx
func (_m *MockIndexNode) GetComponentStates(ctx context.Context) (*milvuspb.ComponentStates, error) {
ret := _m.Called(ctx)
var r0 *milvuspb.ComponentStates
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*milvuspb.ComponentStates, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *milvuspb.ComponentStates); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*milvuspb.ComponentStates)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockIndexNode_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates'
type MockIndexNode_GetComponentStates_Call struct {
*mock.Call
}
// GetComponentStates is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockIndexNode_Expecter) GetComponentStates(ctx interface{}) *MockIndexNode_GetComponentStates_Call {
return &MockIndexNode_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", ctx)}
}
func (_c *MockIndexNode_GetComponentStates_Call) Run(run func(ctx context.Context)) *MockIndexNode_GetComponentStates_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockIndexNode_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockIndexNode_GetComponentStates_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockIndexNode_GetComponentStates_Call) RunAndReturn(run func(context.Context) (*milvuspb.ComponentStates, error)) *MockIndexNode_GetComponentStates_Call {
_c.Call.Return(run)
return _c
}
// GetJobStats provides a mock function with given fields: _a0, _a1
func (_m *MockIndexNode) GetJobStats(_a0 context.Context, _a1 *indexpb.GetJobStatsRequest) (*indexpb.GetJobStatsResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *indexpb.GetJobStatsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *indexpb.GetJobStatsRequest) (*indexpb.GetJobStatsResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *indexpb.GetJobStatsRequest) *indexpb.GetJobStatsResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*indexpb.GetJobStatsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *indexpb.GetJobStatsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockIndexNode_GetJobStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobStats'
type MockIndexNode_GetJobStats_Call struct {
*mock.Call
}
// GetJobStats is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *indexpb.GetJobStatsRequest
func (_e *MockIndexNode_Expecter) GetJobStats(_a0 interface{}, _a1 interface{}) *MockIndexNode_GetJobStats_Call {
return &MockIndexNode_GetJobStats_Call{Call: _e.mock.On("GetJobStats", _a0, _a1)}
}
func (_c *MockIndexNode_GetJobStats_Call) Run(run func(_a0 context.Context, _a1 *indexpb.GetJobStatsRequest)) *MockIndexNode_GetJobStats_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*indexpb.GetJobStatsRequest))
})
return _c
}
func (_c *MockIndexNode_GetJobStats_Call) Return(_a0 *indexpb.GetJobStatsResponse, _a1 error) *MockIndexNode_GetJobStats_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockIndexNode_GetJobStats_Call) RunAndReturn(run func(context.Context, *indexpb.GetJobStatsRequest) (*indexpb.GetJobStatsResponse, error)) *MockIndexNode_GetJobStats_Call {
_c.Call.Return(run)
return _c
}
// GetMetrics provides a mock function with given fields: ctx, req
func (_m *MockIndexNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) {
ret := _m.Called(ctx, req)
var r0 *milvuspb.GetMetricsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok {
return rf(ctx, req)
}
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) *milvuspb.GetMetricsResponse); ok {
r0 = rf(ctx, req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*milvuspb.GetMetricsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetMetricsRequest) error); ok {
r1 = rf(ctx, req)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockIndexNode_GetMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetrics'
type MockIndexNode_GetMetrics_Call struct {
*mock.Call
}
// GetMetrics is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetMetricsRequest
func (_e *MockIndexNode_Expecter) GetMetrics(ctx interface{}, req interface{}) *MockIndexNode_GetMetrics_Call {
return &MockIndexNode_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, req)}
}
func (_c *MockIndexNode_GetMetrics_Call) Run(run func(ctx context.Context, req *milvuspb.GetMetricsRequest)) *MockIndexNode_GetMetrics_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*milvuspb.GetMetricsRequest))
})
return _c
}
func (_c *MockIndexNode_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 error) *MockIndexNode_GetMetrics_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockIndexNode_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *MockIndexNode_GetMetrics_Call {
_c.Call.Return(run)
return _c
}
// GetStatisticsChannel provides a mock function with given fields: ctx
func (_m *MockIndexNode) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) {
ret := _m.Called(ctx)
var r0 *milvuspb.StringResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*milvuspb.StringResponse, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *milvuspb.StringResponse); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*milvuspb.StringResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockIndexNode_GetStatisticsChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatisticsChannel'
type MockIndexNode_GetStatisticsChannel_Call struct {
*mock.Call
}
// GetStatisticsChannel is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockIndexNode_Expecter) GetStatisticsChannel(ctx interface{}) *MockIndexNode_GetStatisticsChannel_Call {
return &MockIndexNode_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", ctx)}
}
func (_c *MockIndexNode_GetStatisticsChannel_Call) Run(run func(ctx context.Context)) *MockIndexNode_GetStatisticsChannel_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockIndexNode_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 error) *MockIndexNode_GetStatisticsChannel_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockIndexNode_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context) (*milvuspb.StringResponse, error)) *MockIndexNode_GetStatisticsChannel_Call {
_c.Call.Return(run)
return _c
}
// Init provides a mock function with given fields:
func (_m *MockIndexNode) Init() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// MockIndexNode_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
type MockIndexNode_Init_Call struct {
*mock.Call
}
// Init is a helper method to define mock.On call
func (_e *MockIndexNode_Expecter) Init() *MockIndexNode_Init_Call {
return &MockIndexNode_Init_Call{Call: _e.mock.On("Init")}
}
func (_c *MockIndexNode_Init_Call) Run(run func()) *MockIndexNode_Init_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockIndexNode_Init_Call) Return(_a0 error) *MockIndexNode_Init_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockIndexNode_Init_Call) RunAndReturn(run func() error) *MockIndexNode_Init_Call {
_c.Call.Return(run)
return _c
}
// QueryJobs provides a mock function with given fields: _a0, _a1
func (_m *MockIndexNode) QueryJobs(_a0 context.Context, _a1 *indexpb.QueryJobsRequest) (*indexpb.QueryJobsResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *indexpb.QueryJobsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *indexpb.QueryJobsRequest) (*indexpb.QueryJobsResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *indexpb.QueryJobsRequest) *indexpb.QueryJobsResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*indexpb.QueryJobsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *indexpb.QueryJobsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockIndexNode_QueryJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryJobs'
type MockIndexNode_QueryJobs_Call struct {
*mock.Call
}
// QueryJobs is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *indexpb.QueryJobsRequest
func (_e *MockIndexNode_Expecter) QueryJobs(_a0 interface{}, _a1 interface{}) *MockIndexNode_QueryJobs_Call {
return &MockIndexNode_QueryJobs_Call{Call: _e.mock.On("QueryJobs", _a0, _a1)}
}
func (_c *MockIndexNode_QueryJobs_Call) Run(run func(_a0 context.Context, _a1 *indexpb.QueryJobsRequest)) *MockIndexNode_QueryJobs_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*indexpb.QueryJobsRequest))
})
return _c
}
func (_c *MockIndexNode_QueryJobs_Call) Return(_a0 *indexpb.QueryJobsResponse, _a1 error) *MockIndexNode_QueryJobs_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockIndexNode_QueryJobs_Call) RunAndReturn(run func(context.Context, *indexpb.QueryJobsRequest) (*indexpb.QueryJobsResponse, error)) *MockIndexNode_QueryJobs_Call {
_c.Call.Return(run)
return _c
}
// Register provides a mock function with given fields:
func (_m *MockIndexNode) Register() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// MockIndexNode_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register'
type MockIndexNode_Register_Call struct {
*mock.Call
}
// Register is a helper method to define mock.On call
func (_e *MockIndexNode_Expecter) Register() *MockIndexNode_Register_Call {
return &MockIndexNode_Register_Call{Call: _e.mock.On("Register")}
}
func (_c *MockIndexNode_Register_Call) Run(run func()) *MockIndexNode_Register_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockIndexNode_Register_Call) Return(_a0 error) *MockIndexNode_Register_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockIndexNode_Register_Call) RunAndReturn(run func() error) *MockIndexNode_Register_Call {
_c.Call.Return(run)
return _c
}
// SetAddress provides a mock function with given fields: address
func (_m *MockIndexNode) SetAddress(address string) {
_m.Called(address)
}
// MockIndexNode_SetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAddress'
type MockIndexNode_SetAddress_Call struct {
*mock.Call
}
// SetAddress is a helper method to define mock.On call
// - address string
func (_e *MockIndexNode_Expecter) SetAddress(address interface{}) *MockIndexNode_SetAddress_Call {
return &MockIndexNode_SetAddress_Call{Call: _e.mock.On("SetAddress", address)}
}
func (_c *MockIndexNode_SetAddress_Call) Run(run func(address string)) *MockIndexNode_SetAddress_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *MockIndexNode_SetAddress_Call) Return() *MockIndexNode_SetAddress_Call {
_c.Call.Return()
return _c
}
func (_c *MockIndexNode_SetAddress_Call) RunAndReturn(run func(string)) *MockIndexNode_SetAddress_Call {
_c.Call.Return(run)
return _c
}
// SetEtcdClient provides a mock function with given fields: etcdClient
func (_m *MockIndexNode) SetEtcdClient(etcdClient *clientv3.Client) {
_m.Called(etcdClient)
}
// MockIndexNode_SetEtcdClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEtcdClient'
type MockIndexNode_SetEtcdClient_Call struct {
*mock.Call
}
// SetEtcdClient is a helper method to define mock.On call
// - etcdClient *clientv3.Client
func (_e *MockIndexNode_Expecter) SetEtcdClient(etcdClient interface{}) *MockIndexNode_SetEtcdClient_Call {
return &MockIndexNode_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)}
}
func (_c *MockIndexNode_SetEtcdClient_Call) Run(run func(etcdClient *clientv3.Client)) *MockIndexNode_SetEtcdClient_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*clientv3.Client))
})
return _c
}
func (_c *MockIndexNode_SetEtcdClient_Call) Return() *MockIndexNode_SetEtcdClient_Call {
_c.Call.Return()
return _c
}
func (_c *MockIndexNode_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *MockIndexNode_SetEtcdClient_Call {
_c.Call.Return(run)
return _c
}
// ShowConfigurations provides a mock function with given fields: ctx, req
func (_m *MockIndexNode) ShowConfigurations(ctx context.Context, req *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error) {
ret := _m.Called(ctx, req)
var r0 *internalpb.ShowConfigurationsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)); ok {
return rf(ctx, req)
}
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ShowConfigurationsRequest) *internalpb.ShowConfigurationsResponse); ok {
r0 = rf(ctx, req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*internalpb.ShowConfigurationsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *internalpb.ShowConfigurationsRequest) error); ok {
r1 = rf(ctx, req)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockIndexNode_ShowConfigurations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShowConfigurations'
type MockIndexNode_ShowConfigurations_Call struct {
*mock.Call
}
// ShowConfigurations is a helper method to define mock.On call
// - ctx context.Context
// - req *internalpb.ShowConfigurationsRequest
func (_e *MockIndexNode_Expecter) ShowConfigurations(ctx interface{}, req interface{}) *MockIndexNode_ShowConfigurations_Call {
return &MockIndexNode_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", ctx, req)}
}
func (_c *MockIndexNode_ShowConfigurations_Call) Run(run func(ctx context.Context, req *internalpb.ShowConfigurationsRequest)) *MockIndexNode_ShowConfigurations_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*internalpb.ShowConfigurationsRequest))
})
return _c
}
func (_c *MockIndexNode_ShowConfigurations_Call) Return(_a0 *internalpb.ShowConfigurationsResponse, _a1 error) *MockIndexNode_ShowConfigurations_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockIndexNode_ShowConfigurations_Call) RunAndReturn(run func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)) *MockIndexNode_ShowConfigurations_Call {
_c.Call.Return(run)
return _c
}
// Start provides a mock function with given fields:
func (_m *MockIndexNode) Start() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// MockIndexNode_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
type MockIndexNode_Start_Call struct {
*mock.Call
}
// Start is a helper method to define mock.On call
func (_e *MockIndexNode_Expecter) Start() *MockIndexNode_Start_Call {
return &MockIndexNode_Start_Call{Call: _e.mock.On("Start")}
}
func (_c *MockIndexNode_Start_Call) Run(run func()) *MockIndexNode_Start_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockIndexNode_Start_Call) Return(_a0 error) *MockIndexNode_Start_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockIndexNode_Start_Call) RunAndReturn(run func() error) *MockIndexNode_Start_Call {
_c.Call.Return(run)
return _c
}
// Stop provides a mock function with given fields:
func (_m *MockIndexNode) Stop() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// MockIndexNode_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
type MockIndexNode_Stop_Call struct {
*mock.Call
}
// Stop is a helper method to define mock.On call
func (_e *MockIndexNode_Expecter) Stop() *MockIndexNode_Stop_Call {
return &MockIndexNode_Stop_Call{Call: _e.mock.On("Stop")}
}
func (_c *MockIndexNode_Stop_Call) Run(run func()) *MockIndexNode_Stop_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockIndexNode_Stop_Call) Return(_a0 error) *MockIndexNode_Stop_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockIndexNode_Stop_Call) RunAndReturn(run func() error) *MockIndexNode_Stop_Call {
_c.Call.Return(run)
return _c
}
// UpdateStateCode provides a mock function with given fields: stateCode
func (_m *MockIndexNode) UpdateStateCode(stateCode commonpb.StateCode) {
_m.Called(stateCode)
}
// MockIndexNode_UpdateStateCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateCode'
type MockIndexNode_UpdateStateCode_Call struct {
*mock.Call
}
// UpdateStateCode is a helper method to define mock.On call
// - stateCode commonpb.StateCode
func (_e *MockIndexNode_Expecter) UpdateStateCode(stateCode interface{}) *MockIndexNode_UpdateStateCode_Call {
return &MockIndexNode_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", stateCode)}
}
func (_c *MockIndexNode_UpdateStateCode_Call) Run(run func(stateCode commonpb.StateCode)) *MockIndexNode_UpdateStateCode_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(commonpb.StateCode))
})
return _c
}
func (_c *MockIndexNode_UpdateStateCode_Call) Return() *MockIndexNode_UpdateStateCode_Call {
_c.Call.Return()
return _c
}
func (_c *MockIndexNode_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *MockIndexNode_UpdateStateCode_Call {
_c.Call.Return(run)
return _c
}
// NewMockIndexNode creates a new instance of MockIndexNode. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockIndexNode(t interface {
mock.TestingT
Cleanup(func())
}) *MockIndexNode {
mock := &MockIndexNode{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
@ -64,8 +64,8 @@ type MockProxy_AllocTimestamp_Call struct {
}
// AllocTimestamp is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.AllocTimestampRequest
// - ctx context.Context
// - req *milvuspb.AllocTimestampRequest
func (_e *MockProxy_Expecter) AllocTimestamp(ctx interface{}, req interface{}) *MockProxy_AllocTimestamp_Call {
return &MockProxy_AllocTimestamp_Call{Call: _e.mock.On("AllocTimestamp", ctx, req)}
}
@ -119,8 +119,8 @@ type MockProxy_AlterAlias_Call struct {
}
// AlterAlias is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.AlterAliasRequest
// - ctx context.Context
// - request *milvuspb.AlterAliasRequest
func (_e *MockProxy_Expecter) AlterAlias(ctx interface{}, request interface{}) *MockProxy_AlterAlias_Call {
return &MockProxy_AlterAlias_Call{Call: _e.mock.On("AlterAlias", ctx, request)}
}
@ -174,8 +174,8 @@ type MockProxy_AlterCollection_Call struct {
}
// AlterCollection is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.AlterCollectionRequest
// - ctx context.Context
// - request *milvuspb.AlterCollectionRequest
func (_e *MockProxy_Expecter) AlterCollection(ctx interface{}, request interface{}) *MockProxy_AlterCollection_Call {
return &MockProxy_AlterCollection_Call{Call: _e.mock.On("AlterCollection", ctx, request)}
}
@ -229,8 +229,8 @@ type MockProxy_CalcDistance_Call struct {
}
// CalcDistance is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.CalcDistanceRequest
// - ctx context.Context
// - request *milvuspb.CalcDistanceRequest
func (_e *MockProxy_Expecter) CalcDistance(ctx interface{}, request interface{}) *MockProxy_CalcDistance_Call {
return &MockProxy_CalcDistance_Call{Call: _e.mock.On("CalcDistance", ctx, request)}
}
@ -284,8 +284,8 @@ type MockProxy_CheckHealth_Call struct {
}
// CheckHealth is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.CheckHealthRequest
// - ctx context.Context
// - req *milvuspb.CheckHealthRequest
func (_e *MockProxy_Expecter) CheckHealth(ctx interface{}, req interface{}) *MockProxy_CheckHealth_Call {
return &MockProxy_CheckHealth_Call{Call: _e.mock.On("CheckHealth", ctx, req)}
}
@ -339,8 +339,8 @@ type MockProxy_Connect_Call struct {
}
// Connect is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ConnectRequest
// - ctx context.Context
// - req *milvuspb.ConnectRequest
func (_e *MockProxy_Expecter) Connect(ctx interface{}, req interface{}) *MockProxy_Connect_Call {
return &MockProxy_Connect_Call{Call: _e.mock.On("Connect", ctx, req)}
}
@ -394,8 +394,8 @@ type MockProxy_CreateAlias_Call struct {
}
// CreateAlias is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.CreateAliasRequest
// - ctx context.Context
// - request *milvuspb.CreateAliasRequest
func (_e *MockProxy_Expecter) CreateAlias(ctx interface{}, request interface{}) *MockProxy_CreateAlias_Call {
return &MockProxy_CreateAlias_Call{Call: _e.mock.On("CreateAlias", ctx, request)}
}
@ -449,8 +449,8 @@ type MockProxy_CreateCollection_Call struct {
}
// CreateCollection is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.CreateCollectionRequest
// - ctx context.Context
// - request *milvuspb.CreateCollectionRequest
func (_e *MockProxy_Expecter) CreateCollection(ctx interface{}, request interface{}) *MockProxy_CreateCollection_Call {
return &MockProxy_CreateCollection_Call{Call: _e.mock.On("CreateCollection", ctx, request)}
}
@ -504,8 +504,8 @@ type MockProxy_CreateCredential_Call struct {
}
// CreateCredential is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.CreateCredentialRequest
// - ctx context.Context
// - req *milvuspb.CreateCredentialRequest
func (_e *MockProxy_Expecter) CreateCredential(ctx interface{}, req interface{}) *MockProxy_CreateCredential_Call {
return &MockProxy_CreateCredential_Call{Call: _e.mock.On("CreateCredential", ctx, req)}
}
@ -559,8 +559,8 @@ type MockProxy_CreateDatabase_Call struct {
}
// CreateDatabase is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.CreateDatabaseRequest
// - ctx context.Context
// - req *milvuspb.CreateDatabaseRequest
func (_e *MockProxy_Expecter) CreateDatabase(ctx interface{}, req interface{}) *MockProxy_CreateDatabase_Call {
return &MockProxy_CreateDatabase_Call{Call: _e.mock.On("CreateDatabase", ctx, req)}
}
@ -614,8 +614,8 @@ type MockProxy_CreateIndex_Call struct {
}
// CreateIndex is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.CreateIndexRequest
// - ctx context.Context
// - request *milvuspb.CreateIndexRequest
func (_e *MockProxy_Expecter) CreateIndex(ctx interface{}, request interface{}) *MockProxy_CreateIndex_Call {
return &MockProxy_CreateIndex_Call{Call: _e.mock.On("CreateIndex", ctx, request)}
}
@ -669,8 +669,8 @@ type MockProxy_CreatePartition_Call struct {
}
// CreatePartition is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.CreatePartitionRequest
// - ctx context.Context
// - request *milvuspb.CreatePartitionRequest
func (_e *MockProxy_Expecter) CreatePartition(ctx interface{}, request interface{}) *MockProxy_CreatePartition_Call {
return &MockProxy_CreatePartition_Call{Call: _e.mock.On("CreatePartition", ctx, request)}
}
@ -724,8 +724,8 @@ type MockProxy_CreateResourceGroup_Call struct {
}
// CreateResourceGroup is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.CreateResourceGroupRequest
// - ctx context.Context
// - req *milvuspb.CreateResourceGroupRequest
func (_e *MockProxy_Expecter) CreateResourceGroup(ctx interface{}, req interface{}) *MockProxy_CreateResourceGroup_Call {
return &MockProxy_CreateResourceGroup_Call{Call: _e.mock.On("CreateResourceGroup", ctx, req)}
}
@ -779,8 +779,8 @@ type MockProxy_CreateRole_Call struct {
}
// CreateRole is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.CreateRoleRequest
// - ctx context.Context
// - req *milvuspb.CreateRoleRequest
func (_e *MockProxy_Expecter) CreateRole(ctx interface{}, req interface{}) *MockProxy_CreateRole_Call {
return &MockProxy_CreateRole_Call{Call: _e.mock.On("CreateRole", ctx, req)}
}
@ -834,8 +834,8 @@ type MockProxy_Delete_Call struct {
}
// Delete is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.DeleteRequest
// - ctx context.Context
// - request *milvuspb.DeleteRequest
func (_e *MockProxy_Expecter) Delete(ctx interface{}, request interface{}) *MockProxy_Delete_Call {
return &MockProxy_Delete_Call{Call: _e.mock.On("Delete", ctx, request)}
}
@ -889,8 +889,8 @@ type MockProxy_DeleteCredential_Call struct {
}
// DeleteCredential is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.DeleteCredentialRequest
// - ctx context.Context
// - req *milvuspb.DeleteCredentialRequest
func (_e *MockProxy_Expecter) DeleteCredential(ctx interface{}, req interface{}) *MockProxy_DeleteCredential_Call {
return &MockProxy_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", ctx, req)}
}
@ -944,8 +944,8 @@ type MockProxy_DescribeCollection_Call struct {
}
// DescribeCollection is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.DescribeCollectionRequest
// - ctx context.Context
// - request *milvuspb.DescribeCollectionRequest
func (_e *MockProxy_Expecter) DescribeCollection(ctx interface{}, request interface{}) *MockProxy_DescribeCollection_Call {
return &MockProxy_DescribeCollection_Call{Call: _e.mock.On("DescribeCollection", ctx, request)}
}
@ -999,8 +999,8 @@ type MockProxy_DescribeIndex_Call struct {
}
// DescribeIndex is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.DescribeIndexRequest
// - ctx context.Context
// - request *milvuspb.DescribeIndexRequest
func (_e *MockProxy_Expecter) DescribeIndex(ctx interface{}, request interface{}) *MockProxy_DescribeIndex_Call {
return &MockProxy_DescribeIndex_Call{Call: _e.mock.On("DescribeIndex", ctx, request)}
}
@ -1054,8 +1054,8 @@ type MockProxy_DescribeResourceGroup_Call struct {
}
// DescribeResourceGroup is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.DescribeResourceGroupRequest
// - ctx context.Context
// - req *milvuspb.DescribeResourceGroupRequest
func (_e *MockProxy_Expecter) DescribeResourceGroup(ctx interface{}, req interface{}) *MockProxy_DescribeResourceGroup_Call {
return &MockProxy_DescribeResourceGroup_Call{Call: _e.mock.On("DescribeResourceGroup", ctx, req)}
}
@ -1109,8 +1109,8 @@ type MockProxy_DropAlias_Call struct {
}
// DropAlias is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.DropAliasRequest
// - ctx context.Context
// - request *milvuspb.DropAliasRequest
func (_e *MockProxy_Expecter) DropAlias(ctx interface{}, request interface{}) *MockProxy_DropAlias_Call {
return &MockProxy_DropAlias_Call{Call: _e.mock.On("DropAlias", ctx, request)}
}
@ -1164,8 +1164,8 @@ type MockProxy_DropCollection_Call struct {
}
// DropCollection is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.DropCollectionRequest
// - ctx context.Context
// - request *milvuspb.DropCollectionRequest
func (_e *MockProxy_Expecter) DropCollection(ctx interface{}, request interface{}) *MockProxy_DropCollection_Call {
return &MockProxy_DropCollection_Call{Call: _e.mock.On("DropCollection", ctx, request)}
}
@ -1219,8 +1219,8 @@ type MockProxy_DropDatabase_Call struct {
}
// DropDatabase is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.DropDatabaseRequest
// - ctx context.Context
// - req *milvuspb.DropDatabaseRequest
func (_e *MockProxy_Expecter) DropDatabase(ctx interface{}, req interface{}) *MockProxy_DropDatabase_Call {
return &MockProxy_DropDatabase_Call{Call: _e.mock.On("DropDatabase", ctx, req)}
}
@ -1274,8 +1274,8 @@ type MockProxy_DropIndex_Call struct {
}
// DropIndex is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.DropIndexRequest
// - ctx context.Context
// - request *milvuspb.DropIndexRequest
func (_e *MockProxy_Expecter) DropIndex(ctx interface{}, request interface{}) *MockProxy_DropIndex_Call {
return &MockProxy_DropIndex_Call{Call: _e.mock.On("DropIndex", ctx, request)}
}
@ -1329,8 +1329,8 @@ type MockProxy_DropPartition_Call struct {
}
// DropPartition is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.DropPartitionRequest
// - ctx context.Context
// - request *milvuspb.DropPartitionRequest
func (_e *MockProxy_Expecter) DropPartition(ctx interface{}, request interface{}) *MockProxy_DropPartition_Call {
return &MockProxy_DropPartition_Call{Call: _e.mock.On("DropPartition", ctx, request)}
}
@ -1384,8 +1384,8 @@ type MockProxy_DropResourceGroup_Call struct {
}
// DropResourceGroup is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.DropResourceGroupRequest
// - ctx context.Context
// - req *milvuspb.DropResourceGroupRequest
func (_e *MockProxy_Expecter) DropResourceGroup(ctx interface{}, req interface{}) *MockProxy_DropResourceGroup_Call {
return &MockProxy_DropResourceGroup_Call{Call: _e.mock.On("DropResourceGroup", ctx, req)}
}
@ -1439,8 +1439,8 @@ type MockProxy_DropRole_Call struct {
}
// DropRole is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.DropRoleRequest
// - ctx context.Context
// - req *milvuspb.DropRoleRequest
func (_e *MockProxy_Expecter) DropRole(ctx interface{}, req interface{}) *MockProxy_DropRole_Call {
return &MockProxy_DropRole_Call{Call: _e.mock.On("DropRole", ctx, req)}
}
@ -1494,8 +1494,8 @@ type MockProxy_Dummy_Call struct {
}
// Dummy is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.DummyRequest
// - ctx context.Context
// - request *milvuspb.DummyRequest
func (_e *MockProxy_Expecter) Dummy(ctx interface{}, request interface{}) *MockProxy_Dummy_Call {
return &MockProxy_Dummy_Call{Call: _e.mock.On("Dummy", ctx, request)}
}
@ -1549,8 +1549,8 @@ type MockProxy_Flush_Call struct {
}
// Flush is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.FlushRequest
// - ctx context.Context
// - request *milvuspb.FlushRequest
func (_e *MockProxy_Expecter) Flush(ctx interface{}, request interface{}) *MockProxy_Flush_Call {
return &MockProxy_Flush_Call{Call: _e.mock.On("Flush", ctx, request)}
}
@ -1604,8 +1604,8 @@ type MockProxy_FlushAll_Call struct {
}
// FlushAll is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.FlushAllRequest
// - ctx context.Context
// - request *milvuspb.FlushAllRequest
func (_e *MockProxy_Expecter) FlushAll(ctx interface{}, request interface{}) *MockProxy_FlushAll_Call {
return &MockProxy_FlushAll_Call{Call: _e.mock.On("FlushAll", ctx, request)}
}
@ -1700,8 +1700,8 @@ type MockProxy_GetCollectionStatistics_Call struct {
}
// GetCollectionStatistics is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetCollectionStatisticsRequest
// - ctx context.Context
// - request *milvuspb.GetCollectionStatisticsRequest
func (_e *MockProxy_Expecter) GetCollectionStatistics(ctx interface{}, request interface{}) *MockProxy_GetCollectionStatistics_Call {
return &MockProxy_GetCollectionStatistics_Call{Call: _e.mock.On("GetCollectionStatistics", ctx, request)}
}
@ -1755,8 +1755,8 @@ type MockProxy_GetCompactionState_Call struct {
}
// GetCompactionState is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetCompactionStateRequest
// - ctx context.Context
// - req *milvuspb.GetCompactionStateRequest
func (_e *MockProxy_Expecter) GetCompactionState(ctx interface{}, req interface{}) *MockProxy_GetCompactionState_Call {
return &MockProxy_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", ctx, req)}
}
@ -1810,8 +1810,8 @@ type MockProxy_GetCompactionStateWithPlans_Call struct {
}
// GetCompactionStateWithPlans is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetCompactionPlansRequest
// - ctx context.Context
// - req *milvuspb.GetCompactionPlansRequest
func (_e *MockProxy_Expecter) GetCompactionStateWithPlans(ctx interface{}, req interface{}) *MockProxy_GetCompactionStateWithPlans_Call {
return &MockProxy_GetCompactionStateWithPlans_Call{Call: _e.mock.On("GetCompactionStateWithPlans", ctx, req)}
}
@ -1865,7 +1865,7 @@ type MockProxy_GetComponentStates_Call struct {
}
// GetComponentStates is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockProxy_Expecter) GetComponentStates(ctx interface{}) *MockProxy_GetComponentStates_Call {
return &MockProxy_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", ctx)}
}
@ -1919,8 +1919,8 @@ type MockProxy_GetDdChannel_Call struct {
}
// GetDdChannel is a helper method to define mock.On call
// - ctx context.Context
// - request *internalpb.GetDdChannelRequest
// - ctx context.Context
// - request *internalpb.GetDdChannelRequest
func (_e *MockProxy_Expecter) GetDdChannel(ctx interface{}, request interface{}) *MockProxy_GetDdChannel_Call {
return &MockProxy_GetDdChannel_Call{Call: _e.mock.On("GetDdChannel", ctx, request)}
}
@ -1974,8 +1974,8 @@ type MockProxy_GetFlushAllState_Call struct {
}
// GetFlushAllState is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetFlushAllStateRequest
// - ctx context.Context
// - req *milvuspb.GetFlushAllStateRequest
func (_e *MockProxy_Expecter) GetFlushAllState(ctx interface{}, req interface{}) *MockProxy_GetFlushAllState_Call {
return &MockProxy_GetFlushAllState_Call{Call: _e.mock.On("GetFlushAllState", ctx, req)}
}
@ -2029,8 +2029,8 @@ type MockProxy_GetFlushState_Call struct {
}
// GetFlushState is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetFlushStateRequest
// - ctx context.Context
// - req *milvuspb.GetFlushStateRequest
func (_e *MockProxy_Expecter) GetFlushState(ctx interface{}, req interface{}) *MockProxy_GetFlushState_Call {
return &MockProxy_GetFlushState_Call{Call: _e.mock.On("GetFlushState", ctx, req)}
}
@ -2084,8 +2084,8 @@ type MockProxy_GetImportState_Call struct {
}
// GetImportState is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetImportStateRequest
// - ctx context.Context
// - req *milvuspb.GetImportStateRequest
func (_e *MockProxy_Expecter) GetImportState(ctx interface{}, req interface{}) *MockProxy_GetImportState_Call {
return &MockProxy_GetImportState_Call{Call: _e.mock.On("GetImportState", ctx, req)}
}
@ -2139,8 +2139,8 @@ type MockProxy_GetIndexBuildProgress_Call struct {
}
// GetIndexBuildProgress is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetIndexBuildProgressRequest
// - ctx context.Context
// - request *milvuspb.GetIndexBuildProgressRequest
func (_e *MockProxy_Expecter) GetIndexBuildProgress(ctx interface{}, request interface{}) *MockProxy_GetIndexBuildProgress_Call {
return &MockProxy_GetIndexBuildProgress_Call{Call: _e.mock.On("GetIndexBuildProgress", ctx, request)}
}
@ -2194,8 +2194,8 @@ type MockProxy_GetIndexState_Call struct {
}
// GetIndexState is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetIndexStateRequest
// - ctx context.Context
// - request *milvuspb.GetIndexStateRequest
func (_e *MockProxy_Expecter) GetIndexState(ctx interface{}, request interface{}) *MockProxy_GetIndexState_Call {
return &MockProxy_GetIndexState_Call{Call: _e.mock.On("GetIndexState", ctx, request)}
}
@ -2249,8 +2249,8 @@ type MockProxy_GetIndexStatistics_Call struct {
}
// GetIndexStatistics is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetIndexStatisticsRequest
// - ctx context.Context
// - request *milvuspb.GetIndexStatisticsRequest
func (_e *MockProxy_Expecter) GetIndexStatistics(ctx interface{}, request interface{}) *MockProxy_GetIndexStatistics_Call {
return &MockProxy_GetIndexStatistics_Call{Call: _e.mock.On("GetIndexStatistics", ctx, request)}
}
@ -2304,8 +2304,8 @@ type MockProxy_GetLoadState_Call struct {
}
// GetLoadState is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetLoadStateRequest
// - ctx context.Context
// - request *milvuspb.GetLoadStateRequest
func (_e *MockProxy_Expecter) GetLoadState(ctx interface{}, request interface{}) *MockProxy_GetLoadState_Call {
return &MockProxy_GetLoadState_Call{Call: _e.mock.On("GetLoadState", ctx, request)}
}
@ -2359,8 +2359,8 @@ type MockProxy_GetLoadingProgress_Call struct {
}
// GetLoadingProgress is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetLoadingProgressRequest
// - ctx context.Context
// - request *milvuspb.GetLoadingProgressRequest
func (_e *MockProxy_Expecter) GetLoadingProgress(ctx interface{}, request interface{}) *MockProxy_GetLoadingProgress_Call {
return &MockProxy_GetLoadingProgress_Call{Call: _e.mock.On("GetLoadingProgress", ctx, request)}
}
@ -2414,8 +2414,8 @@ type MockProxy_GetMetrics_Call struct {
}
// GetMetrics is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetMetricsRequest
// - ctx context.Context
// - request *milvuspb.GetMetricsRequest
func (_e *MockProxy_Expecter) GetMetrics(ctx interface{}, request interface{}) *MockProxy_GetMetrics_Call {
return &MockProxy_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, request)}
}
@ -2469,8 +2469,8 @@ type MockProxy_GetPartitionStatistics_Call struct {
}
// GetPartitionStatistics is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetPartitionStatisticsRequest
// - ctx context.Context
// - request *milvuspb.GetPartitionStatisticsRequest
func (_e *MockProxy_Expecter) GetPartitionStatistics(ctx interface{}, request interface{}) *MockProxy_GetPartitionStatistics_Call {
return &MockProxy_GetPartitionStatistics_Call{Call: _e.mock.On("GetPartitionStatistics", ctx, request)}
}
@ -2524,8 +2524,8 @@ type MockProxy_GetPersistentSegmentInfo_Call struct {
}
// GetPersistentSegmentInfo is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetPersistentSegmentInfoRequest
// - ctx context.Context
// - request *milvuspb.GetPersistentSegmentInfoRequest
func (_e *MockProxy_Expecter) GetPersistentSegmentInfo(ctx interface{}, request interface{}) *MockProxy_GetPersistentSegmentInfo_Call {
return &MockProxy_GetPersistentSegmentInfo_Call{Call: _e.mock.On("GetPersistentSegmentInfo", ctx, request)}
}
@ -2579,8 +2579,8 @@ type MockProxy_GetProxyMetrics_Call struct {
}
// GetProxyMetrics is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetMetricsRequest
// - ctx context.Context
// - request *milvuspb.GetMetricsRequest
func (_e *MockProxy_Expecter) GetProxyMetrics(ctx interface{}, request interface{}) *MockProxy_GetProxyMetrics_Call {
return &MockProxy_GetProxyMetrics_Call{Call: _e.mock.On("GetProxyMetrics", ctx, request)}
}
@ -2634,8 +2634,8 @@ type MockProxy_GetQuerySegmentInfo_Call struct {
}
// GetQuerySegmentInfo is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.GetQuerySegmentInfoRequest
// - ctx context.Context
// - request *milvuspb.GetQuerySegmentInfoRequest
func (_e *MockProxy_Expecter) GetQuerySegmentInfo(ctx interface{}, request interface{}) *MockProxy_GetQuerySegmentInfo_Call {
return &MockProxy_GetQuerySegmentInfo_Call{Call: _e.mock.On("GetQuerySegmentInfo", ctx, request)}
}
@ -2742,8 +2742,8 @@ type MockProxy_GetReplicas_Call struct {
}
// GetReplicas is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetReplicasRequest
// - ctx context.Context
// - req *milvuspb.GetReplicasRequest
func (_e *MockProxy_Expecter) GetReplicas(ctx interface{}, req interface{}) *MockProxy_GetReplicas_Call {
return &MockProxy_GetReplicas_Call{Call: _e.mock.On("GetReplicas", ctx, req)}
}
@ -2797,7 +2797,7 @@ type MockProxy_GetStatisticsChannel_Call struct {
}
// GetStatisticsChannel is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockProxy_Expecter) GetStatisticsChannel(ctx interface{}) *MockProxy_GetStatisticsChannel_Call {
return &MockProxy_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", ctx)}
}
@ -2851,8 +2851,8 @@ type MockProxy_HasCollection_Call struct {
}
// HasCollection is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.HasCollectionRequest
// - ctx context.Context
// - request *milvuspb.HasCollectionRequest
func (_e *MockProxy_Expecter) HasCollection(ctx interface{}, request interface{}) *MockProxy_HasCollection_Call {
return &MockProxy_HasCollection_Call{Call: _e.mock.On("HasCollection", ctx, request)}
}
@ -2906,8 +2906,8 @@ type MockProxy_HasPartition_Call struct {
}
// HasPartition is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.HasPartitionRequest
// - ctx context.Context
// - request *milvuspb.HasPartitionRequest
func (_e *MockProxy_Expecter) HasPartition(ctx interface{}, request interface{}) *MockProxy_HasPartition_Call {
return &MockProxy_HasPartition_Call{Call: _e.mock.On("HasPartition", ctx, request)}
}
@ -2961,8 +2961,8 @@ type MockProxy_Import_Call struct {
}
// Import is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ImportRequest
// - ctx context.Context
// - req *milvuspb.ImportRequest
func (_e *MockProxy_Expecter) Import(ctx interface{}, req interface{}) *MockProxy_Import_Call {
return &MockProxy_Import_Call{Call: _e.mock.On("Import", ctx, req)}
}
@ -3057,8 +3057,8 @@ type MockProxy_Insert_Call struct {
}
// Insert is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.InsertRequest
// - ctx context.Context
// - request *milvuspb.InsertRequest
func (_e *MockProxy_Expecter) Insert(ctx interface{}, request interface{}) *MockProxy_Insert_Call {
return &MockProxy_Insert_Call{Call: _e.mock.On("Insert", ctx, request)}
}
@ -3112,8 +3112,8 @@ type MockProxy_InvalidateCollectionMetaCache_Call struct {
}
// InvalidateCollectionMetaCache is a helper method to define mock.On call
// - ctx context.Context
// - request *proxypb.InvalidateCollMetaCacheRequest
// - ctx context.Context
// - request *proxypb.InvalidateCollMetaCacheRequest
func (_e *MockProxy_Expecter) InvalidateCollectionMetaCache(ctx interface{}, request interface{}) *MockProxy_InvalidateCollectionMetaCache_Call {
return &MockProxy_InvalidateCollectionMetaCache_Call{Call: _e.mock.On("InvalidateCollectionMetaCache", ctx, request)}
}
@ -3167,8 +3167,8 @@ type MockProxy_InvalidateCredentialCache_Call struct {
}
// InvalidateCredentialCache is a helper method to define mock.On call
// - ctx context.Context
// - request *proxypb.InvalidateCredCacheRequest
// - ctx context.Context
// - request *proxypb.InvalidateCredCacheRequest
func (_e *MockProxy_Expecter) InvalidateCredentialCache(ctx interface{}, request interface{}) *MockProxy_InvalidateCredentialCache_Call {
return &MockProxy_InvalidateCredentialCache_Call{Call: _e.mock.On("InvalidateCredentialCache", ctx, request)}
}
@ -3222,8 +3222,8 @@ type MockProxy_ListClientInfos_Call struct {
}
// ListClientInfos is a helper method to define mock.On call
// - ctx context.Context
// - req *proxypb.ListClientInfosRequest
// - ctx context.Context
// - req *proxypb.ListClientInfosRequest
func (_e *MockProxy_Expecter) ListClientInfos(ctx interface{}, req interface{}) *MockProxy_ListClientInfos_Call {
return &MockProxy_ListClientInfos_Call{Call: _e.mock.On("ListClientInfos", ctx, req)}
}
@ -3277,8 +3277,8 @@ type MockProxy_ListCredUsers_Call struct {
}
// ListCredUsers is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ListCredUsersRequest
// - ctx context.Context
// - req *milvuspb.ListCredUsersRequest
func (_e *MockProxy_Expecter) ListCredUsers(ctx interface{}, req interface{}) *MockProxy_ListCredUsers_Call {
return &MockProxy_ListCredUsers_Call{Call: _e.mock.On("ListCredUsers", ctx, req)}
}
@ -3332,8 +3332,8 @@ type MockProxy_ListDatabases_Call struct {
}
// ListDatabases is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ListDatabasesRequest
// - ctx context.Context
// - req *milvuspb.ListDatabasesRequest
func (_e *MockProxy_Expecter) ListDatabases(ctx interface{}, req interface{}) *MockProxy_ListDatabases_Call {
return &MockProxy_ListDatabases_Call{Call: _e.mock.On("ListDatabases", ctx, req)}
}
@ -3387,8 +3387,8 @@ type MockProxy_ListImportTasks_Call struct {
}
// ListImportTasks is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ListImportTasksRequest
// - ctx context.Context
// - req *milvuspb.ListImportTasksRequest
func (_e *MockProxy_Expecter) ListImportTasks(ctx interface{}, req interface{}) *MockProxy_ListImportTasks_Call {
return &MockProxy_ListImportTasks_Call{Call: _e.mock.On("ListImportTasks", ctx, req)}
}
@ -3442,8 +3442,8 @@ type MockProxy_ListResourceGroups_Call struct {
}
// ListResourceGroups is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ListResourceGroupsRequest
// - ctx context.Context
// - req *milvuspb.ListResourceGroupsRequest
func (_e *MockProxy_Expecter) ListResourceGroups(ctx interface{}, req interface{}) *MockProxy_ListResourceGroups_Call {
return &MockProxy_ListResourceGroups_Call{Call: _e.mock.On("ListResourceGroups", ctx, req)}
}
@ -3497,8 +3497,8 @@ type MockProxy_LoadBalance_Call struct {
}
// LoadBalance is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.LoadBalanceRequest
// - ctx context.Context
// - request *milvuspb.LoadBalanceRequest
func (_e *MockProxy_Expecter) LoadBalance(ctx interface{}, request interface{}) *MockProxy_LoadBalance_Call {
return &MockProxy_LoadBalance_Call{Call: _e.mock.On("LoadBalance", ctx, request)}
}
@ -3552,8 +3552,8 @@ type MockProxy_LoadCollection_Call struct {
}
// LoadCollection is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.LoadCollectionRequest
// - ctx context.Context
// - request *milvuspb.LoadCollectionRequest
func (_e *MockProxy_Expecter) LoadCollection(ctx interface{}, request interface{}) *MockProxy_LoadCollection_Call {
return &MockProxy_LoadCollection_Call{Call: _e.mock.On("LoadCollection", ctx, request)}
}
@ -3607,8 +3607,8 @@ type MockProxy_LoadPartitions_Call struct {
}
// LoadPartitions is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.LoadPartitionsRequest
// - ctx context.Context
// - request *milvuspb.LoadPartitionsRequest
func (_e *MockProxy_Expecter) LoadPartitions(ctx interface{}, request interface{}) *MockProxy_LoadPartitions_Call {
return &MockProxy_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", ctx, request)}
}
@ -3662,8 +3662,8 @@ type MockProxy_ManualCompaction_Call struct {
}
// ManualCompaction is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ManualCompactionRequest
// - ctx context.Context
// - req *milvuspb.ManualCompactionRequest
func (_e *MockProxy_Expecter) ManualCompaction(ctx interface{}, req interface{}) *MockProxy_ManualCompaction_Call {
return &MockProxy_ManualCompaction_Call{Call: _e.mock.On("ManualCompaction", ctx, req)}
}
@ -3717,8 +3717,8 @@ type MockProxy_OperatePrivilege_Call struct {
}
// OperatePrivilege is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.OperatePrivilegeRequest
// - ctx context.Context
// - req *milvuspb.OperatePrivilegeRequest
func (_e *MockProxy_Expecter) OperatePrivilege(ctx interface{}, req interface{}) *MockProxy_OperatePrivilege_Call {
return &MockProxy_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", ctx, req)}
}
@ -3772,8 +3772,8 @@ type MockProxy_OperateUserRole_Call struct {
}
// OperateUserRole is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.OperateUserRoleRequest
// - ctx context.Context
// - req *milvuspb.OperateUserRoleRequest
func (_e *MockProxy_Expecter) OperateUserRole(ctx interface{}, req interface{}) *MockProxy_OperateUserRole_Call {
return &MockProxy_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", ctx, req)}
}
@ -3827,8 +3827,8 @@ type MockProxy_Query_Call struct {
}
// Query is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.QueryRequest
// - ctx context.Context
// - request *milvuspb.QueryRequest
func (_e *MockProxy_Expecter) Query(ctx interface{}, request interface{}) *MockProxy_Query_Call {
return &MockProxy_Query_Call{Call: _e.mock.On("Query", ctx, request)}
}
@ -3882,8 +3882,8 @@ type MockProxy_RefreshPolicyInfoCache_Call struct {
}
// RefreshPolicyInfoCache is a helper method to define mock.On call
// - ctx context.Context
// - req *proxypb.RefreshPolicyInfoCacheRequest
// - ctx context.Context
// - req *proxypb.RefreshPolicyInfoCacheRequest
func (_e *MockProxy_Expecter) RefreshPolicyInfoCache(ctx interface{}, req interface{}) *MockProxy_RefreshPolicyInfoCache_Call {
return &MockProxy_RefreshPolicyInfoCache_Call{Call: _e.mock.On("RefreshPolicyInfoCache", ctx, req)}
}
@ -3978,8 +3978,8 @@ type MockProxy_RegisterLink_Call struct {
}
// RegisterLink is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.RegisterLinkRequest
// - ctx context.Context
// - request *milvuspb.RegisterLinkRequest
func (_e *MockProxy_Expecter) RegisterLink(ctx interface{}, request interface{}) *MockProxy_RegisterLink_Call {
return &MockProxy_RegisterLink_Call{Call: _e.mock.On("RegisterLink", ctx, request)}
}
@ -4033,8 +4033,8 @@ type MockProxy_ReleaseCollection_Call struct {
}
// ReleaseCollection is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.ReleaseCollectionRequest
// - ctx context.Context
// - request *milvuspb.ReleaseCollectionRequest
func (_e *MockProxy_Expecter) ReleaseCollection(ctx interface{}, request interface{}) *MockProxy_ReleaseCollection_Call {
return &MockProxy_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", ctx, request)}
}
@ -4088,8 +4088,8 @@ type MockProxy_ReleasePartitions_Call struct {
}
// ReleasePartitions is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.ReleasePartitionsRequest
// - ctx context.Context
// - request *milvuspb.ReleasePartitionsRequest
func (_e *MockProxy_Expecter) ReleasePartitions(ctx interface{}, request interface{}) *MockProxy_ReleasePartitions_Call {
return &MockProxy_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", ctx, request)}
}
@ -4143,8 +4143,8 @@ type MockProxy_RenameCollection_Call struct {
}
// RenameCollection is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.RenameCollectionRequest
// - ctx context.Context
// - req *milvuspb.RenameCollectionRequest
func (_e *MockProxy_Expecter) RenameCollection(ctx interface{}, req interface{}) *MockProxy_RenameCollection_Call {
return &MockProxy_RenameCollection_Call{Call: _e.mock.On("RenameCollection", ctx, req)}
}
@ -4198,8 +4198,8 @@ type MockProxy_Search_Call struct {
}
// Search is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.SearchRequest
// - ctx context.Context
// - request *milvuspb.SearchRequest
func (_e *MockProxy_Expecter) Search(ctx interface{}, request interface{}) *MockProxy_Search_Call {
return &MockProxy_Search_Call{Call: _e.mock.On("Search", ctx, request)}
}
@ -4253,8 +4253,8 @@ type MockProxy_SelectGrant_Call struct {
}
// SelectGrant is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.SelectGrantRequest
// - ctx context.Context
// - req *milvuspb.SelectGrantRequest
func (_e *MockProxy_Expecter) SelectGrant(ctx interface{}, req interface{}) *MockProxy_SelectGrant_Call {
return &MockProxy_SelectGrant_Call{Call: _e.mock.On("SelectGrant", ctx, req)}
}
@ -4308,8 +4308,8 @@ type MockProxy_SelectRole_Call struct {
}
// SelectRole is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.SelectRoleRequest
// - ctx context.Context
// - req *milvuspb.SelectRoleRequest
func (_e *MockProxy_Expecter) SelectRole(ctx interface{}, req interface{}) *MockProxy_SelectRole_Call {
return &MockProxy_SelectRole_Call{Call: _e.mock.On("SelectRole", ctx, req)}
}
@ -4363,8 +4363,8 @@ type MockProxy_SelectUser_Call struct {
}
// SelectUser is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.SelectUserRequest
// - ctx context.Context
// - req *milvuspb.SelectUserRequest
func (_e *MockProxy_Expecter) SelectUser(ctx interface{}, req interface{}) *MockProxy_SelectUser_Call {
return &MockProxy_SelectUser_Call{Call: _e.mock.On("SelectUser", ctx, req)}
}
@ -4397,7 +4397,7 @@ type MockProxy_SetAddress_Call struct {
}
// SetAddress is a helper method to define mock.On call
// - address string
// - address string
func (_e *MockProxy_Expecter) SetAddress(address interface{}) *MockProxy_SetAddress_Call {
return &MockProxy_SetAddress_Call{Call: _e.mock.On("SetAddress", address)}
}
@ -4430,7 +4430,7 @@ type MockProxy_SetDataCoordClient_Call struct {
}
// SetDataCoordClient is a helper method to define mock.On call
// - dataCoord types.DataCoord
// - dataCoord types.DataCoord
func (_e *MockProxy_Expecter) SetDataCoordClient(dataCoord interface{}) *MockProxy_SetDataCoordClient_Call {
return &MockProxy_SetDataCoordClient_Call{Call: _e.mock.On("SetDataCoordClient", dataCoord)}
}
@ -4463,7 +4463,7 @@ type MockProxy_SetEtcdClient_Call struct {
}
// SetEtcdClient is a helper method to define mock.On call
// - etcdClient *clientv3.Client
// - etcdClient *clientv3.Client
func (_e *MockProxy_Expecter) SetEtcdClient(etcdClient interface{}) *MockProxy_SetEtcdClient_Call {
return &MockProxy_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)}
}
@ -4496,7 +4496,7 @@ type MockProxy_SetQueryCoordClient_Call struct {
}
// SetQueryCoordClient is a helper method to define mock.On call
// - queryCoord types.QueryCoord
// - queryCoord types.QueryCoord
func (_e *MockProxy_Expecter) SetQueryCoordClient(queryCoord interface{}) *MockProxy_SetQueryCoordClient_Call {
return &MockProxy_SetQueryCoordClient_Call{Call: _e.mock.On("SetQueryCoordClient", queryCoord)}
}
@ -4529,7 +4529,7 @@ type MockProxy_SetQueryNodeCreator_Call struct {
}
// SetQueryNodeCreator is a helper method to define mock.On call
// - _a0 func(context.Context , string , int64)(types.QueryNode , error)
// - _a0 func(context.Context , string , int64)(types.QueryNode , error)
func (_e *MockProxy_Expecter) SetQueryNodeCreator(_a0 interface{}) *MockProxy_SetQueryNodeCreator_Call {
return &MockProxy_SetQueryNodeCreator_Call{Call: _e.mock.On("SetQueryNodeCreator", _a0)}
}
@ -4583,8 +4583,8 @@ type MockProxy_SetRates_Call struct {
}
// SetRates is a helper method to define mock.On call
// - ctx context.Context
// - req *proxypb.SetRatesRequest
// - ctx context.Context
// - req *proxypb.SetRatesRequest
func (_e *MockProxy_Expecter) SetRates(ctx interface{}, req interface{}) *MockProxy_SetRates_Call {
return &MockProxy_SetRates_Call{Call: _e.mock.On("SetRates", ctx, req)}
}
@ -4617,7 +4617,7 @@ type MockProxy_SetRootCoordClient_Call struct {
}
// SetRootCoordClient is a helper method to define mock.On call
// - rootCoord types.RootCoord
// - rootCoord types.RootCoord
func (_e *MockProxy_Expecter) SetRootCoordClient(rootCoord interface{}) *MockProxy_SetRootCoordClient_Call {
return &MockProxy_SetRootCoordClient_Call{Call: _e.mock.On("SetRootCoordClient", rootCoord)}
}
@ -4671,8 +4671,8 @@ type MockProxy_ShowCollections_Call struct {
}
// ShowCollections is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.ShowCollectionsRequest
// - ctx context.Context
// - request *milvuspb.ShowCollectionsRequest
func (_e *MockProxy_Expecter) ShowCollections(ctx interface{}, request interface{}) *MockProxy_ShowCollections_Call {
return &MockProxy_ShowCollections_Call{Call: _e.mock.On("ShowCollections", ctx, request)}
}
@ -4726,8 +4726,8 @@ type MockProxy_ShowPartitions_Call struct {
}
// ShowPartitions is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.ShowPartitionsRequest
// - ctx context.Context
// - request *milvuspb.ShowPartitionsRequest
func (_e *MockProxy_Expecter) ShowPartitions(ctx interface{}, request interface{}) *MockProxy_ShowPartitions_Call {
return &MockProxy_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", ctx, request)}
}
@ -4863,8 +4863,8 @@ type MockProxy_TransferNode_Call struct {
}
// TransferNode is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.TransferNodeRequest
// - ctx context.Context
// - req *milvuspb.TransferNodeRequest
func (_e *MockProxy_Expecter) TransferNode(ctx interface{}, req interface{}) *MockProxy_TransferNode_Call {
return &MockProxy_TransferNode_Call{Call: _e.mock.On("TransferNode", ctx, req)}
}
@ -4918,8 +4918,8 @@ type MockProxy_TransferReplica_Call struct {
}
// TransferReplica is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.TransferReplicaRequest
// - ctx context.Context
// - req *milvuspb.TransferReplicaRequest
func (_e *MockProxy_Expecter) TransferReplica(ctx interface{}, req interface{}) *MockProxy_TransferReplica_Call {
return &MockProxy_TransferReplica_Call{Call: _e.mock.On("TransferReplica", ctx, req)}
}
@ -4973,8 +4973,8 @@ type MockProxy_UpdateCredential_Call struct {
}
// UpdateCredential is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.UpdateCredentialRequest
// - ctx context.Context
// - req *milvuspb.UpdateCredentialRequest
func (_e *MockProxy_Expecter) UpdateCredential(ctx interface{}, req interface{}) *MockProxy_UpdateCredential_Call {
return &MockProxy_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", ctx, req)}
}
@ -5028,8 +5028,8 @@ type MockProxy_UpdateCredentialCache_Call struct {
}
// UpdateCredentialCache is a helper method to define mock.On call
// - ctx context.Context
// - request *proxypb.UpdateCredCacheRequest
// - ctx context.Context
// - request *proxypb.UpdateCredCacheRequest
func (_e *MockProxy_Expecter) UpdateCredentialCache(ctx interface{}, request interface{}) *MockProxy_UpdateCredentialCache_Call {
return &MockProxy_UpdateCredentialCache_Call{Call: _e.mock.On("UpdateCredentialCache", ctx, request)}
}
@ -5062,7 +5062,7 @@ type MockProxy_UpdateStateCode_Call struct {
}
// UpdateStateCode is a helper method to define mock.On call
// - stateCode commonpb.StateCode
// - stateCode commonpb.StateCode
func (_e *MockProxy_Expecter) UpdateStateCode(stateCode interface{}) *MockProxy_UpdateStateCode_Call {
return &MockProxy_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", stateCode)}
}
@ -5116,8 +5116,8 @@ type MockProxy_Upsert_Call struct {
}
// Upsert is a helper method to define mock.On call
// - ctx context.Context
// - request *milvuspb.UpsertRequest
// - ctx context.Context
// - request *milvuspb.UpsertRequest
func (_e *MockProxy_Expecter) Upsert(ctx interface{}, request interface{}) *MockProxy_Upsert_Call {
return &MockProxy_Upsert_Call{Call: _e.mock.On("Upsert", ctx, request)}
}

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
@ -64,8 +64,8 @@ type MockQueryCoord_CheckHealth_Call struct {
}
// CheckHealth is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.CheckHealthRequest
// - ctx context.Context
// - req *milvuspb.CheckHealthRequest
func (_e *MockQueryCoord_Expecter) CheckHealth(ctx interface{}, req interface{}) *MockQueryCoord_CheckHealth_Call {
return &MockQueryCoord_CheckHealth_Call{Call: _e.mock.On("CheckHealth", ctx, req)}
}
@ -119,8 +119,8 @@ type MockQueryCoord_CreateResourceGroup_Call struct {
}
// CreateResourceGroup is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.CreateResourceGroupRequest
// - ctx context.Context
// - req *milvuspb.CreateResourceGroupRequest
func (_e *MockQueryCoord_Expecter) CreateResourceGroup(ctx interface{}, req interface{}) *MockQueryCoord_CreateResourceGroup_Call {
return &MockQueryCoord_CreateResourceGroup_Call{Call: _e.mock.On("CreateResourceGroup", ctx, req)}
}
@ -174,8 +174,8 @@ type MockQueryCoord_DescribeResourceGroup_Call struct {
}
// DescribeResourceGroup is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.DescribeResourceGroupRequest
// - ctx context.Context
// - req *querypb.DescribeResourceGroupRequest
func (_e *MockQueryCoord_Expecter) DescribeResourceGroup(ctx interface{}, req interface{}) *MockQueryCoord_DescribeResourceGroup_Call {
return &MockQueryCoord_DescribeResourceGroup_Call{Call: _e.mock.On("DescribeResourceGroup", ctx, req)}
}
@ -229,8 +229,8 @@ type MockQueryCoord_DropResourceGroup_Call struct {
}
// DropResourceGroup is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.DropResourceGroupRequest
// - ctx context.Context
// - req *milvuspb.DropResourceGroupRequest
func (_e *MockQueryCoord_Expecter) DropResourceGroup(ctx interface{}, req interface{}) *MockQueryCoord_DropResourceGroup_Call {
return &MockQueryCoord_DropResourceGroup_Call{Call: _e.mock.On("DropResourceGroup", ctx, req)}
}
@ -284,7 +284,7 @@ type MockQueryCoord_GetComponentStates_Call struct {
}
// GetComponentStates is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockQueryCoord_Expecter) GetComponentStates(ctx interface{}) *MockQueryCoord_GetComponentStates_Call {
return &MockQueryCoord_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", ctx)}
}
@ -338,8 +338,8 @@ type MockQueryCoord_GetMetrics_Call struct {
}
// GetMetrics is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetMetricsRequest
// - ctx context.Context
// - req *milvuspb.GetMetricsRequest
func (_e *MockQueryCoord_Expecter) GetMetrics(ctx interface{}, req interface{}) *MockQueryCoord_GetMetrics_Call {
return &MockQueryCoord_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, req)}
}
@ -393,8 +393,8 @@ type MockQueryCoord_GetPartitionStates_Call struct {
}
// GetPartitionStates is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.GetPartitionStatesRequest
// - ctx context.Context
// - req *querypb.GetPartitionStatesRequest
func (_e *MockQueryCoord_Expecter) GetPartitionStates(ctx interface{}, req interface{}) *MockQueryCoord_GetPartitionStates_Call {
return &MockQueryCoord_GetPartitionStates_Call{Call: _e.mock.On("GetPartitionStates", ctx, req)}
}
@ -448,8 +448,8 @@ type MockQueryCoord_GetReplicas_Call struct {
}
// GetReplicas is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.GetReplicasRequest
// - ctx context.Context
// - req *milvuspb.GetReplicasRequest
func (_e *MockQueryCoord_Expecter) GetReplicas(ctx interface{}, req interface{}) *MockQueryCoord_GetReplicas_Call {
return &MockQueryCoord_GetReplicas_Call{Call: _e.mock.On("GetReplicas", ctx, req)}
}
@ -503,8 +503,8 @@ type MockQueryCoord_GetSegmentInfo_Call struct {
}
// GetSegmentInfo is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.GetSegmentInfoRequest
// - ctx context.Context
// - req *querypb.GetSegmentInfoRequest
func (_e *MockQueryCoord_Expecter) GetSegmentInfo(ctx interface{}, req interface{}) *MockQueryCoord_GetSegmentInfo_Call {
return &MockQueryCoord_GetSegmentInfo_Call{Call: _e.mock.On("GetSegmentInfo", ctx, req)}
}
@ -558,8 +558,8 @@ type MockQueryCoord_GetShardLeaders_Call struct {
}
// GetShardLeaders is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.GetShardLeadersRequest
// - ctx context.Context
// - req *querypb.GetShardLeadersRequest
func (_e *MockQueryCoord_Expecter) GetShardLeaders(ctx interface{}, req interface{}) *MockQueryCoord_GetShardLeaders_Call {
return &MockQueryCoord_GetShardLeaders_Call{Call: _e.mock.On("GetShardLeaders", ctx, req)}
}
@ -613,7 +613,7 @@ type MockQueryCoord_GetStatisticsChannel_Call struct {
}
// GetStatisticsChannel is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockQueryCoord_Expecter) GetStatisticsChannel(ctx interface{}) *MockQueryCoord_GetStatisticsChannel_Call {
return &MockQueryCoord_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", ctx)}
}
@ -667,7 +667,7 @@ type MockQueryCoord_GetTimeTickChannel_Call struct {
}
// GetTimeTickChannel is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockQueryCoord_Expecter) GetTimeTickChannel(ctx interface{}) *MockQueryCoord_GetTimeTickChannel_Call {
return &MockQueryCoord_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", ctx)}
}
@ -762,8 +762,8 @@ type MockQueryCoord_ListResourceGroups_Call struct {
}
// ListResourceGroups is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.ListResourceGroupsRequest
// - ctx context.Context
// - req *milvuspb.ListResourceGroupsRequest
func (_e *MockQueryCoord_Expecter) ListResourceGroups(ctx interface{}, req interface{}) *MockQueryCoord_ListResourceGroups_Call {
return &MockQueryCoord_ListResourceGroups_Call{Call: _e.mock.On("ListResourceGroups", ctx, req)}
}
@ -817,8 +817,8 @@ type MockQueryCoord_LoadBalance_Call struct {
}
// LoadBalance is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.LoadBalanceRequest
// - ctx context.Context
// - req *querypb.LoadBalanceRequest
func (_e *MockQueryCoord_Expecter) LoadBalance(ctx interface{}, req interface{}) *MockQueryCoord_LoadBalance_Call {
return &MockQueryCoord_LoadBalance_Call{Call: _e.mock.On("LoadBalance", ctx, req)}
}
@ -872,8 +872,8 @@ type MockQueryCoord_LoadCollection_Call struct {
}
// LoadCollection is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.LoadCollectionRequest
// - ctx context.Context
// - req *querypb.LoadCollectionRequest
func (_e *MockQueryCoord_Expecter) LoadCollection(ctx interface{}, req interface{}) *MockQueryCoord_LoadCollection_Call {
return &MockQueryCoord_LoadCollection_Call{Call: _e.mock.On("LoadCollection", ctx, req)}
}
@ -927,8 +927,8 @@ type MockQueryCoord_LoadPartitions_Call struct {
}
// LoadPartitions is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.LoadPartitionsRequest
// - ctx context.Context
// - req *querypb.LoadPartitionsRequest
func (_e *MockQueryCoord_Expecter) LoadPartitions(ctx interface{}, req interface{}) *MockQueryCoord_LoadPartitions_Call {
return &MockQueryCoord_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", ctx, req)}
}
@ -1023,8 +1023,8 @@ type MockQueryCoord_ReleaseCollection_Call struct {
}
// ReleaseCollection is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.ReleaseCollectionRequest
// - ctx context.Context
// - req *querypb.ReleaseCollectionRequest
func (_e *MockQueryCoord_Expecter) ReleaseCollection(ctx interface{}, req interface{}) *MockQueryCoord_ReleaseCollection_Call {
return &MockQueryCoord_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", ctx, req)}
}
@ -1078,8 +1078,8 @@ type MockQueryCoord_ReleasePartitions_Call struct {
}
// ReleasePartitions is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.ReleasePartitionsRequest
// - ctx context.Context
// - req *querypb.ReleasePartitionsRequest
func (_e *MockQueryCoord_Expecter) ReleasePartitions(ctx interface{}, req interface{}) *MockQueryCoord_ReleasePartitions_Call {
return &MockQueryCoord_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", ctx, req)}
}
@ -1112,7 +1112,7 @@ type MockQueryCoord_SetAddress_Call struct {
}
// SetAddress is a helper method to define mock.On call
// - address string
// - address string
func (_e *MockQueryCoord_Expecter) SetAddress(address interface{}) *MockQueryCoord_SetAddress_Call {
return &MockQueryCoord_SetAddress_Call{Call: _e.mock.On("SetAddress", address)}
}
@ -1154,7 +1154,7 @@ type MockQueryCoord_SetDataCoord_Call struct {
}
// SetDataCoord is a helper method to define mock.On call
// - dataCoord types.DataCoord
// - dataCoord types.DataCoord
func (_e *MockQueryCoord_Expecter) SetDataCoord(dataCoord interface{}) *MockQueryCoord_SetDataCoord_Call {
return &MockQueryCoord_SetDataCoord_Call{Call: _e.mock.On("SetDataCoord", dataCoord)}
}
@ -1187,7 +1187,7 @@ type MockQueryCoord_SetEtcdClient_Call struct {
}
// SetEtcdClient is a helper method to define mock.On call
// - etcdClient *clientv3.Client
// - etcdClient *clientv3.Client
func (_e *MockQueryCoord_Expecter) SetEtcdClient(etcdClient interface{}) *MockQueryCoord_SetEtcdClient_Call {
return &MockQueryCoord_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)}
}
@ -1220,7 +1220,7 @@ type MockQueryCoord_SetQueryNodeCreator_Call struct {
}
// SetQueryNodeCreator is a helper method to define mock.On call
// - _a0 func(context.Context , string , int64)(types.QueryNode , error)
// - _a0 func(context.Context , string , int64)(types.QueryNode , error)
func (_e *MockQueryCoord_Expecter) SetQueryNodeCreator(_a0 interface{}) *MockQueryCoord_SetQueryNodeCreator_Call {
return &MockQueryCoord_SetQueryNodeCreator_Call{Call: _e.mock.On("SetQueryNodeCreator", _a0)}
}
@ -1262,7 +1262,7 @@ type MockQueryCoord_SetRootCoord_Call struct {
}
// SetRootCoord is a helper method to define mock.On call
// - rootCoord types.RootCoord
// - rootCoord types.RootCoord
func (_e *MockQueryCoord_Expecter) SetRootCoord(rootCoord interface{}) *MockQueryCoord_SetRootCoord_Call {
return &MockQueryCoord_SetRootCoord_Call{Call: _e.mock.On("SetRootCoord", rootCoord)}
}
@ -1316,8 +1316,8 @@ type MockQueryCoord_ShowCollections_Call struct {
}
// ShowCollections is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.ShowCollectionsRequest
// - ctx context.Context
// - req *querypb.ShowCollectionsRequest
func (_e *MockQueryCoord_Expecter) ShowCollections(ctx interface{}, req interface{}) *MockQueryCoord_ShowCollections_Call {
return &MockQueryCoord_ShowCollections_Call{Call: _e.mock.On("ShowCollections", ctx, req)}
}
@ -1371,8 +1371,8 @@ type MockQueryCoord_ShowConfigurations_Call struct {
}
// ShowConfigurations is a helper method to define mock.On call
// - ctx context.Context
// - req *internalpb.ShowConfigurationsRequest
// - ctx context.Context
// - req *internalpb.ShowConfigurationsRequest
func (_e *MockQueryCoord_Expecter) ShowConfigurations(ctx interface{}, req interface{}) *MockQueryCoord_ShowConfigurations_Call {
return &MockQueryCoord_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", ctx, req)}
}
@ -1426,8 +1426,8 @@ type MockQueryCoord_ShowPartitions_Call struct {
}
// ShowPartitions is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.ShowPartitionsRequest
// - ctx context.Context
// - req *querypb.ShowPartitionsRequest
func (_e *MockQueryCoord_Expecter) ShowPartitions(ctx interface{}, req interface{}) *MockQueryCoord_ShowPartitions_Call {
return &MockQueryCoord_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", ctx, req)}
}
@ -1563,8 +1563,8 @@ type MockQueryCoord_SyncNewCreatedPartition_Call struct {
}
// SyncNewCreatedPartition is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.SyncNewCreatedPartitionRequest
// - ctx context.Context
// - req *querypb.SyncNewCreatedPartitionRequest
func (_e *MockQueryCoord_Expecter) SyncNewCreatedPartition(ctx interface{}, req interface{}) *MockQueryCoord_SyncNewCreatedPartition_Call {
return &MockQueryCoord_SyncNewCreatedPartition_Call{Call: _e.mock.On("SyncNewCreatedPartition", ctx, req)}
}
@ -1618,8 +1618,8 @@ type MockQueryCoord_TransferNode_Call struct {
}
// TransferNode is a helper method to define mock.On call
// - ctx context.Context
// - req *milvuspb.TransferNodeRequest
// - ctx context.Context
// - req *milvuspb.TransferNodeRequest
func (_e *MockQueryCoord_Expecter) TransferNode(ctx interface{}, req interface{}) *MockQueryCoord_TransferNode_Call {
return &MockQueryCoord_TransferNode_Call{Call: _e.mock.On("TransferNode", ctx, req)}
}
@ -1673,8 +1673,8 @@ type MockQueryCoord_TransferReplica_Call struct {
}
// TransferReplica is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.TransferReplicaRequest
// - ctx context.Context
// - req *querypb.TransferReplicaRequest
func (_e *MockQueryCoord_Expecter) TransferReplica(ctx interface{}, req interface{}) *MockQueryCoord_TransferReplica_Call {
return &MockQueryCoord_TransferReplica_Call{Call: _e.mock.On("TransferReplica", ctx, req)}
}
@ -1707,7 +1707,7 @@ type MockQueryCoord_UpdateStateCode_Call struct {
}
// UpdateStateCode is a helper method to define mock.On call
// - stateCode commonpb.StateCode
// - stateCode commonpb.StateCode
func (_e *MockQueryCoord_Expecter) UpdateStateCode(stateCode interface{}) *MockQueryCoord_UpdateStateCode_Call {
return &MockQueryCoord_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", stateCode)}
}

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
@ -6,6 +6,7 @@ import (
context "context"
commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
clientv3 "go.etcd.io/etcd/client/v3"
internalpb "github.com/milvus-io/milvus/internal/proto/internalpb"
@ -16,9 +17,11 @@ import (
proxypb "github.com/milvus-io/milvus/internal/proto/proxypb"
rootcoordpb "github.com/milvus-io/milvus/internal/proto/rootcoordpb"
types "github.com/milvus-io/milvus/internal/types"
)
// RootCoord is an autogenerated mock type for the RootCoord type
// RootCoord is an autogenerated mock type for the RootCoordComponent type
type RootCoord struct {
mock.Mock
}
@ -2310,6 +2313,189 @@ func (_c *RootCoord_SelectUser_Call) RunAndReturn(run func(context.Context, *mil
return _c
}
// SetAddress provides a mock function with given fields: address
func (_m *RootCoord) SetAddress(address string) {
_m.Called(address)
}
// RootCoord_SetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAddress'
type RootCoord_SetAddress_Call struct {
*mock.Call
}
// SetAddress is a helper method to define mock.On call
// - address string
func (_e *RootCoord_Expecter) SetAddress(address interface{}) *RootCoord_SetAddress_Call {
return &RootCoord_SetAddress_Call{Call: _e.mock.On("SetAddress", address)}
}
func (_c *RootCoord_SetAddress_Call) Run(run func(address string)) *RootCoord_SetAddress_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *RootCoord_SetAddress_Call) Return() *RootCoord_SetAddress_Call {
_c.Call.Return()
return _c
}
func (_c *RootCoord_SetAddress_Call) RunAndReturn(run func(string)) *RootCoord_SetAddress_Call {
_c.Call.Return(run)
return _c
}
// SetDataCoord provides a mock function with given fields: dataCoord
func (_m *RootCoord) SetDataCoord(dataCoord types.DataCoord) error {
ret := _m.Called(dataCoord)
var r0 error
if rf, ok := ret.Get(0).(func(types.DataCoord) error); ok {
r0 = rf(dataCoord)
} else {
r0 = ret.Error(0)
}
return r0
}
// RootCoord_SetDataCoord_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDataCoord'
type RootCoord_SetDataCoord_Call struct {
*mock.Call
}
// SetDataCoord is a helper method to define mock.On call
// - dataCoord types.DataCoord
func (_e *RootCoord_Expecter) SetDataCoord(dataCoord interface{}) *RootCoord_SetDataCoord_Call {
return &RootCoord_SetDataCoord_Call{Call: _e.mock.On("SetDataCoord", dataCoord)}
}
func (_c *RootCoord_SetDataCoord_Call) Run(run func(dataCoord types.DataCoord)) *RootCoord_SetDataCoord_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.DataCoord))
})
return _c
}
func (_c *RootCoord_SetDataCoord_Call) Return(_a0 error) *RootCoord_SetDataCoord_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *RootCoord_SetDataCoord_Call) RunAndReturn(run func(types.DataCoord) error) *RootCoord_SetDataCoord_Call {
_c.Call.Return(run)
return _c
}
// SetEtcdClient provides a mock function with given fields: etcdClient
func (_m *RootCoord) SetEtcdClient(etcdClient *clientv3.Client) {
_m.Called(etcdClient)
}
// RootCoord_SetEtcdClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEtcdClient'
type RootCoord_SetEtcdClient_Call struct {
*mock.Call
}
// SetEtcdClient is a helper method to define mock.On call
// - etcdClient *clientv3.Client
func (_e *RootCoord_Expecter) SetEtcdClient(etcdClient interface{}) *RootCoord_SetEtcdClient_Call {
return &RootCoord_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)}
}
func (_c *RootCoord_SetEtcdClient_Call) Run(run func(etcdClient *clientv3.Client)) *RootCoord_SetEtcdClient_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*clientv3.Client))
})
return _c
}
func (_c *RootCoord_SetEtcdClient_Call) Return() *RootCoord_SetEtcdClient_Call {
_c.Call.Return()
return _c
}
func (_c *RootCoord_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *RootCoord_SetEtcdClient_Call {
_c.Call.Return(run)
return _c
}
// SetProxyCreator provides a mock function with given fields: _a0
func (_m *RootCoord) SetProxyCreator(_a0 func(context.Context, string, int64) (types.Proxy, error)) {
_m.Called(_a0)
}
// RootCoord_SetProxyCreator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetProxyCreator'
type RootCoord_SetProxyCreator_Call struct {
*mock.Call
}
// SetProxyCreator is a helper method to define mock.On call
// - _a0 func(context.Context , string , int64)(types.Proxy , error)
func (_e *RootCoord_Expecter) SetProxyCreator(_a0 interface{}) *RootCoord_SetProxyCreator_Call {
return &RootCoord_SetProxyCreator_Call{Call: _e.mock.On("SetProxyCreator", _a0)}
}
func (_c *RootCoord_SetProxyCreator_Call) Run(run func(_a0 func(context.Context, string, int64) (types.Proxy, error))) *RootCoord_SetProxyCreator_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(func(context.Context, string, int64) (types.Proxy, error)))
})
return _c
}
func (_c *RootCoord_SetProxyCreator_Call) Return() *RootCoord_SetProxyCreator_Call {
_c.Call.Return()
return _c
}
func (_c *RootCoord_SetProxyCreator_Call) RunAndReturn(run func(func(context.Context, string, int64) (types.Proxy, error))) *RootCoord_SetProxyCreator_Call {
_c.Call.Return(run)
return _c
}
// SetQueryCoord provides a mock function with given fields: queryCoord
func (_m *RootCoord) SetQueryCoord(queryCoord types.QueryCoord) error {
ret := _m.Called(queryCoord)
var r0 error
if rf, ok := ret.Get(0).(func(types.QueryCoord) error); ok {
r0 = rf(queryCoord)
} else {
r0 = ret.Error(0)
}
return r0
}
// RootCoord_SetQueryCoord_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetQueryCoord'
type RootCoord_SetQueryCoord_Call struct {
*mock.Call
}
// SetQueryCoord is a helper method to define mock.On call
// - queryCoord types.QueryCoord
func (_e *RootCoord_Expecter) SetQueryCoord(queryCoord interface{}) *RootCoord_SetQueryCoord_Call {
return &RootCoord_SetQueryCoord_Call{Call: _e.mock.On("SetQueryCoord", queryCoord)}
}
func (_c *RootCoord_SetQueryCoord_Call) Run(run func(queryCoord types.QueryCoord)) *RootCoord_SetQueryCoord_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(types.QueryCoord))
})
return _c
}
func (_c *RootCoord_SetQueryCoord_Call) Return(_a0 error) *RootCoord_SetQueryCoord_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *RootCoord_SetQueryCoord_Call) RunAndReturn(run func(types.QueryCoord) error) *RootCoord_SetQueryCoord_Call {
_c.Call.Return(run)
return _c
}
// ShowCollections provides a mock function with given fields: ctx, req
func (_m *RootCoord) ShowCollections(ctx context.Context, req *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) {
ret := _m.Called(ctx, req)
@ -2777,6 +2963,39 @@ func (_c *RootCoord_UpdateCredential_Call) RunAndReturn(run func(context.Context
return _c
}
// UpdateStateCode provides a mock function with given fields: _a0
func (_m *RootCoord) UpdateStateCode(_a0 commonpb.StateCode) {
_m.Called(_a0)
}
// RootCoord_UpdateStateCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateCode'
type RootCoord_UpdateStateCode_Call struct {
*mock.Call
}
// UpdateStateCode is a helper method to define mock.On call
// - _a0 commonpb.StateCode
func (_e *RootCoord_Expecter) UpdateStateCode(_a0 interface{}) *RootCoord_UpdateStateCode_Call {
return &RootCoord_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", _a0)}
}
func (_c *RootCoord_UpdateStateCode_Call) Run(run func(_a0 commonpb.StateCode)) *RootCoord_UpdateStateCode_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(commonpb.StateCode))
})
return _c
}
func (_c *RootCoord_UpdateStateCode_Call) Return() *RootCoord_UpdateStateCode_Call {
_c.Call.Return()
return _c
}
func (_c *RootCoord_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *RootCoord_UpdateStateCode_Call {
_c.Call.Return(run)
return _c
}
// NewRootCoord creates a new instance of RootCoord. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewRootCoord(t interface {

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.21.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package proxy
@ -975,13 +975,12 @@ func (_c *MockCache_expireShardLeaderCache_Call) RunAndReturn(run func(context.C
return _c
}
type mockConstructorTestingTNewMockCache interface {
// NewMockCache creates a new instance of MockCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockCache(t interface {
mock.TestingT
Cleanup(func())
}
// NewMockCache creates a new instance of MockCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockCache(t mockConstructorTestingTNewMockCache) *MockCache {
}) *MockCache {
mock := &MockCache{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.21.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package proxy
@ -209,13 +209,12 @@ func (_c *MockLBBalancer_UpdateCostMetrics_Call) RunAndReturn(run func(int64, *i
return _c
}
type mockConstructorTestingTNewMockLBBalancer interface {
// NewMockLBBalancer creates a new instance of MockLBBalancer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockLBBalancer(t interface {
mock.TestingT
Cleanup(func())
}
// NewMockLBBalancer creates a new instance of MockLBBalancer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockLBBalancer(t mockConstructorTestingTNewMockLBBalancer) *MockLBBalancer {
}) *MockLBBalancer {
mock := &MockLBBalancer{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.23.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package proxy
@ -207,13 +207,12 @@ func (_c *MockLBPolicy_UpdateCostMetrics_Call) RunAndReturn(run func(int64, *int
return _c
}
type mockConstructorTestingTNewMockLBPolicy interface {
// NewMockLBPolicy creates a new instance of MockLBPolicy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockLBPolicy(t interface {
mock.TestingT
Cleanup(func())
}
// NewMockLBPolicy creates a new instance of MockLBPolicy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockLBPolicy(t mockConstructorTestingTNewMockLBPolicy) *MockLBPolicy {
}) *MockLBPolicy {
mock := &MockLBPolicy{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.21.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package proxy
@ -185,13 +185,12 @@ func (_c *MockShardClientManager_UpdateShardLeaders_Call) RunAndReturn(run func(
return _c
}
type mockConstructorTestingTNewMockShardClientManager interface {
// NewMockShardClientManager creates a new instance of MockShardClientManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockShardClientManager(t interface {
mock.TestingT
Cleanup(func())
}
// NewMockShardClientManager creates a new instance of MockShardClientManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockShardClientManager(t mockConstructorTestingTNewMockShardClientManager) *MockShardClientManager {
}) *MockShardClientManager {
mock := &MockShardClientManager{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package proxy
@ -27,6 +27,10 @@ func (_m *mockTimestampAllocator) AllocTimestamp(ctx context.Context, req *rootc
ret := _m.Called(ctx, req)
var r0 *rootcoordpb.AllocTimestampResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error)); ok {
return rf(ctx, req)
}
if rf, ok := ret.Get(0).(func(context.Context, *rootcoordpb.AllocTimestampRequest) *rootcoordpb.AllocTimestampResponse); ok {
r0 = rf(ctx, req)
} else {
@ -35,7 +39,6 @@ func (_m *mockTimestampAllocator) AllocTimestamp(ctx context.Context, req *rootc
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *rootcoordpb.AllocTimestampRequest) error); ok {
r1 = rf(ctx, req)
} else {
@ -69,13 +72,17 @@ func (_c *mockTimestampAllocator_AllocTimestamp_Call) Return(_a0 *rootcoordpb.Al
return _c
}
type mockConstructorTestingTnewMockTimestampAllocator interface {
mock.TestingT
Cleanup(func())
func (_c *mockTimestampAllocator_AllocTimestamp_Call) RunAndReturn(run func(context.Context, *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error)) *mockTimestampAllocator_AllocTimestamp_Call {
_c.Call.Return(run)
return _c
}
// newMockTimestampAllocator creates a new instance of mockTimestampAllocator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func newMockTimestampAllocator(t mockConstructorTestingTnewMockTimestampAllocator) *mockTimestampAllocator {
// The first argument is typically a *testing.T value.
func newMockTimestampAllocator(t interface {
mock.TestingT
Cleanup(func())
}) *mockTimestampAllocator {
mock := &mockTimestampAllocator{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package balance
@ -42,8 +42,8 @@ type MockBalancer_AssignChannel_Call struct {
}
// AssignChannel is a helper method to define mock.On call
// - channels []*meta.DmChannel
// - nodes []int64
// - channels []*meta.DmChannel
// - nodes []int64
func (_e *MockBalancer_Expecter) AssignChannel(channels interface{}, nodes interface{}) *MockBalancer_AssignChannel_Call {
return &MockBalancer_AssignChannel_Call{Call: _e.mock.On("AssignChannel", channels, nodes)}
}
@ -60,6 +60,11 @@ func (_c *MockBalancer_AssignChannel_Call) Return(_a0 []ChannelAssignPlan) *Mock
return _c
}
func (_c *MockBalancer_AssignChannel_Call) RunAndReturn(run func([]*meta.DmChannel, []int64) []ChannelAssignPlan) *MockBalancer_AssignChannel_Call {
_c.Call.Return(run)
return _c
}
// AssignSegment provides a mock function with given fields: collectionID, segments, nodes
func (_m *MockBalancer) AssignSegment(collectionID int64, segments []*meta.Segment, nodes []int64) []SegmentAssignPlan {
ret := _m.Called(collectionID, segments, nodes)
@ -82,9 +87,9 @@ type MockBalancer_AssignSegment_Call struct {
}
// AssignSegment is a helper method to define mock.On call
// - collectionID int64
// - segments []*meta.Segment
// - nodes []int64
// - collectionID int64
// - segments []*meta.Segment
// - nodes []int64
func (_e *MockBalancer_Expecter) AssignSegment(collectionID interface{}, segments interface{}, nodes interface{}) *MockBalancer_AssignSegment_Call {
return &MockBalancer_AssignSegment_Call{Call: _e.mock.On("AssignSegment", collectionID, segments, nodes)}
}
@ -101,11 +106,20 @@ func (_c *MockBalancer_AssignSegment_Call) Return(_a0 []SegmentAssignPlan) *Mock
return _c
}
func (_c *MockBalancer_AssignSegment_Call) RunAndReturn(run func(int64, []*meta.Segment, []int64) []SegmentAssignPlan) *MockBalancer_AssignSegment_Call {
_c.Call.Return(run)
return _c
}
// BalanceReplica provides a mock function with given fields: replica
func (_m *MockBalancer) BalanceReplica(replica *meta.Replica) ([]SegmentAssignPlan, []ChannelAssignPlan) {
ret := _m.Called(replica)
var r0 []SegmentAssignPlan
var r1 []ChannelAssignPlan
if rf, ok := ret.Get(0).(func(*meta.Replica) ([]SegmentAssignPlan, []ChannelAssignPlan)); ok {
return rf(replica)
}
if rf, ok := ret.Get(0).(func(*meta.Replica) []SegmentAssignPlan); ok {
r0 = rf(replica)
} else {
@ -114,7 +128,6 @@ func (_m *MockBalancer) BalanceReplica(replica *meta.Replica) ([]SegmentAssignPl
}
}
var r1 []ChannelAssignPlan
if rf, ok := ret.Get(1).(func(*meta.Replica) []ChannelAssignPlan); ok {
r1 = rf(replica)
} else {
@ -132,7 +145,7 @@ type MockBalancer_BalanceReplica_Call struct {
}
// BalanceReplica is a helper method to define mock.On call
// - replica *meta.Replica
// - replica *meta.Replica
func (_e *MockBalancer_Expecter) BalanceReplica(replica interface{}) *MockBalancer_BalanceReplica_Call {
return &MockBalancer_BalanceReplica_Call{Call: _e.mock.On("BalanceReplica", replica)}
}
@ -149,13 +162,17 @@ func (_c *MockBalancer_BalanceReplica_Call) Return(_a0 []SegmentAssignPlan, _a1
return _c
}
type mockConstructorTestingTNewMockBalancer interface {
mock.TestingT
Cleanup(func())
func (_c *MockBalancer_BalanceReplica_Call) RunAndReturn(run func(*meta.Replica) ([]SegmentAssignPlan, []ChannelAssignPlan)) *MockBalancer_BalanceReplica_Call {
_c.Call.Return(run)
return _c
}
// NewMockBalancer creates a new instance of MockBalancer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockBalancer(t mockConstructorTestingTNewMockBalancer) *MockBalancer {
// The first argument is typically a *testing.T value.
func NewMockBalancer(t interface {
mock.TestingT
Cleanup(func())
}) *MockBalancer {
mock := &MockBalancer{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package dist
@ -32,7 +32,7 @@ type MockController_Remove_Call struct {
}
// Remove is a helper method to define mock.On call
// - nodeID int64
// - nodeID int64
func (_e *MockController_Expecter) Remove(nodeID interface{}) *MockController_Remove_Call {
return &MockController_Remove_Call{Call: _e.mock.On("Remove", nodeID)}
}
@ -49,6 +49,11 @@ func (_c *MockController_Remove_Call) Return() *MockController_Remove_Call {
return _c
}
func (_c *MockController_Remove_Call) RunAndReturn(run func(int64)) *MockController_Remove_Call {
_c.Call.Return(run)
return _c
}
// StartDistInstance provides a mock function with given fields: ctx, nodeID
func (_m *MockController) StartDistInstance(ctx context.Context, nodeID int64) {
_m.Called(ctx, nodeID)
@ -60,8 +65,8 @@ type MockController_StartDistInstance_Call struct {
}
// StartDistInstance is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - ctx context.Context
// - nodeID int64
func (_e *MockController_Expecter) StartDistInstance(ctx interface{}, nodeID interface{}) *MockController_StartDistInstance_Call {
return &MockController_StartDistInstance_Call{Call: _e.mock.On("StartDistInstance", ctx, nodeID)}
}
@ -78,6 +83,11 @@ func (_c *MockController_StartDistInstance_Call) Return() *MockController_StartD
return _c
}
func (_c *MockController_StartDistInstance_Call) RunAndReturn(run func(context.Context, int64)) *MockController_StartDistInstance_Call {
_c.Call.Return(run)
return _c
}
// Stop provides a mock function with given fields:
func (_m *MockController) Stop() {
_m.Called()
@ -105,6 +115,11 @@ func (_c *MockController_Stop_Call) Return() *MockController_Stop_Call {
return _c
}
func (_c *MockController_Stop_Call) RunAndReturn(run func()) *MockController_Stop_Call {
_c.Call.Return(run)
return _c
}
// SyncAll provides a mock function with given fields: ctx
func (_m *MockController) SyncAll(ctx context.Context) {
_m.Called(ctx)
@ -116,7 +131,7 @@ type MockController_SyncAll_Call struct {
}
// SyncAll is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockController_Expecter) SyncAll(ctx interface{}) *MockController_SyncAll_Call {
return &MockController_SyncAll_Call{Call: _e.mock.On("SyncAll", ctx)}
}
@ -133,13 +148,17 @@ func (_c *MockController_SyncAll_Call) Return() *MockController_SyncAll_Call {
return _c
}
type mockConstructorTestingTNewMockController interface {
mock.TestingT
Cleanup(func())
func (_c *MockController_SyncAll_Call) RunAndReturn(run func(context.Context)) *MockController_SyncAll_Call {
_c.Call.Return(run)
return _c
}
// NewMockController creates a new instance of MockController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockController(t mockConstructorTestingTNewMockController) *MockController {
// The first argument is typically a *testing.T value.
func NewMockController(t interface {
mock.TestingT
Cleanup(func())
}) *MockController {
mock := &MockController{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package meta
@ -33,6 +33,10 @@ func (_m *MockBroker) DescribeIndex(ctx context.Context, collectionID int64) ([]
ret := _m.Called(ctx, collectionID)
var r0 []*indexpb.IndexInfo
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]*indexpb.IndexInfo, error)); ok {
return rf(ctx, collectionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []*indexpb.IndexInfo); ok {
r0 = rf(ctx, collectionID)
} else {
@ -41,7 +45,6 @@ func (_m *MockBroker) DescribeIndex(ctx context.Context, collectionID int64) ([]
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, collectionID)
} else {
@ -75,11 +78,20 @@ func (_c *MockBroker_DescribeIndex_Call) Return(_a0 []*indexpb.IndexInfo, _a1 er
return _c
}
func (_c *MockBroker_DescribeIndex_Call) RunAndReturn(run func(context.Context, int64) ([]*indexpb.IndexInfo, error)) *MockBroker_DescribeIndex_Call {
_c.Call.Return(run)
return _c
}
// GetCollectionSchema provides a mock function with given fields: ctx, collectionID
func (_m *MockBroker) GetCollectionSchema(ctx context.Context, collectionID int64) (*schemapb.CollectionSchema, error) {
ret := _m.Called(ctx, collectionID)
var r0 *schemapb.CollectionSchema
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*schemapb.CollectionSchema, error)); ok {
return rf(ctx, collectionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *schemapb.CollectionSchema); ok {
r0 = rf(ctx, collectionID)
} else {
@ -88,7 +100,6 @@ func (_m *MockBroker) GetCollectionSchema(ctx context.Context, collectionID int6
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, collectionID)
} else {
@ -104,8 +115,8 @@ type MockBroker_GetCollectionSchema_Call struct {
}
// GetCollectionSchema is a helper method to define mock.On call
// - ctx context.Context
// - collectionID int64
// - ctx context.Context
// - collectionID int64
func (_e *MockBroker_Expecter) GetCollectionSchema(ctx interface{}, collectionID interface{}) *MockBroker_GetCollectionSchema_Call {
return &MockBroker_GetCollectionSchema_Call{Call: _e.mock.On("GetCollectionSchema", ctx, collectionID)}
}
@ -122,11 +133,20 @@ func (_c *MockBroker_GetCollectionSchema_Call) Return(_a0 *schemapb.CollectionSc
return _c
}
func (_c *MockBroker_GetCollectionSchema_Call) RunAndReturn(run func(context.Context, int64) (*schemapb.CollectionSchema, error)) *MockBroker_GetCollectionSchema_Call {
_c.Call.Return(run)
return _c
}
// GetIndexInfo provides a mock function with given fields: ctx, collectionID, segmentID
func (_m *MockBroker) GetIndexInfo(ctx context.Context, collectionID int64, segmentID int64) ([]*querypb.FieldIndexInfo, error) {
ret := _m.Called(ctx, collectionID, segmentID)
var r0 []*querypb.FieldIndexInfo
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) ([]*querypb.FieldIndexInfo, error)); ok {
return rf(ctx, collectionID, segmentID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) []*querypb.FieldIndexInfo); ok {
r0 = rf(ctx, collectionID, segmentID)
} else {
@ -135,7 +155,6 @@ func (_m *MockBroker) GetIndexInfo(ctx context.Context, collectionID int64, segm
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok {
r1 = rf(ctx, collectionID, segmentID)
} else {
@ -151,9 +170,9 @@ type MockBroker_GetIndexInfo_Call struct {
}
// GetIndexInfo is a helper method to define mock.On call
// - ctx context.Context
// - collectionID int64
// - segmentID int64
// - ctx context.Context
// - collectionID int64
// - segmentID int64
func (_e *MockBroker_Expecter) GetIndexInfo(ctx interface{}, collectionID interface{}, segmentID interface{}) *MockBroker_GetIndexInfo_Call {
return &MockBroker_GetIndexInfo_Call{Call: _e.mock.On("GetIndexInfo", ctx, collectionID, segmentID)}
}
@ -170,11 +189,20 @@ func (_c *MockBroker_GetIndexInfo_Call) Return(_a0 []*querypb.FieldIndexInfo, _a
return _c
}
func (_c *MockBroker_GetIndexInfo_Call) RunAndReturn(run func(context.Context, int64, int64) ([]*querypb.FieldIndexInfo, error)) *MockBroker_GetIndexInfo_Call {
_c.Call.Return(run)
return _c
}
// GetPartitions provides a mock function with given fields: ctx, collectionID
func (_m *MockBroker) GetPartitions(ctx context.Context, collectionID int64) ([]int64, error) {
ret := _m.Called(ctx, collectionID)
var r0 []int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) ([]int64, error)); ok {
return rf(ctx, collectionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) []int64); ok {
r0 = rf(ctx, collectionID)
} else {
@ -183,7 +211,6 @@ func (_m *MockBroker) GetPartitions(ctx context.Context, collectionID int64) ([]
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, collectionID)
} else {
@ -199,8 +226,8 @@ type MockBroker_GetPartitions_Call struct {
}
// GetPartitions is a helper method to define mock.On call
// - ctx context.Context
// - collectionID int64
// - ctx context.Context
// - collectionID int64
func (_e *MockBroker_Expecter) GetPartitions(ctx interface{}, collectionID interface{}) *MockBroker_GetPartitions_Call {
return &MockBroker_GetPartitions_Call{Call: _e.mock.On("GetPartitions", ctx, collectionID)}
}
@ -217,11 +244,21 @@ func (_c *MockBroker_GetPartitions_Call) Return(_a0 []int64, _a1 error) *MockBro
return _c
}
func (_c *MockBroker_GetPartitions_Call) RunAndReturn(run func(context.Context, int64) ([]int64, error)) *MockBroker_GetPartitions_Call {
_c.Call.Return(run)
return _c
}
// GetRecoveryInfo provides a mock function with given fields: ctx, collectionID, partitionID
func (_m *MockBroker) GetRecoveryInfo(ctx context.Context, collectionID int64, partitionID int64) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error) {
ret := _m.Called(ctx, collectionID, partitionID)
var r0 []*datapb.VchannelInfo
var r1 []*datapb.SegmentBinlogs
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error)); ok {
return rf(ctx, collectionID, partitionID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, int64) []*datapb.VchannelInfo); ok {
r0 = rf(ctx, collectionID, partitionID)
} else {
@ -230,7 +267,6 @@ func (_m *MockBroker) GetRecoveryInfo(ctx context.Context, collectionID int64, p
}
}
var r1 []*datapb.SegmentBinlogs
if rf, ok := ret.Get(1).(func(context.Context, int64, int64) []*datapb.SegmentBinlogs); ok {
r1 = rf(ctx, collectionID, partitionID)
} else {
@ -239,7 +275,6 @@ func (_m *MockBroker) GetRecoveryInfo(ctx context.Context, collectionID int64, p
}
}
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, int64, int64) error); ok {
r2 = rf(ctx, collectionID, partitionID)
} else {
@ -255,9 +290,9 @@ type MockBroker_GetRecoveryInfo_Call struct {
}
// GetRecoveryInfo is a helper method to define mock.On call
// - ctx context.Context
// - collectionID int64
// - partitionID int64
// - ctx context.Context
// - collectionID int64
// - partitionID int64
func (_e *MockBroker_Expecter) GetRecoveryInfo(ctx interface{}, collectionID interface{}, partitionID interface{}) *MockBroker_GetRecoveryInfo_Call {
return &MockBroker_GetRecoveryInfo_Call{Call: _e.mock.On("GetRecoveryInfo", ctx, collectionID, partitionID)}
}
@ -274,6 +309,11 @@ func (_c *MockBroker_GetRecoveryInfo_Call) Return(_a0 []*datapb.VchannelInfo, _a
return _c
}
func (_c *MockBroker_GetRecoveryInfo_Call) RunAndReturn(run func(context.Context, int64, int64) ([]*datapb.VchannelInfo, []*datapb.SegmentBinlogs, error)) *MockBroker_GetRecoveryInfo_Call {
_c.Call.Return(run)
return _c
}
// GetRecoveryInfoV2 provides a mock function with given fields: ctx, collectionID, partitionIDs
func (_m *MockBroker) GetRecoveryInfoV2(ctx context.Context, collectionID int64, partitionIDs ...int64) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error) {
_va := make([]interface{}, len(partitionIDs))
@ -286,6 +326,11 @@ func (_m *MockBroker) GetRecoveryInfoV2(ctx context.Context, collectionID int64,
ret := _m.Called(_ca...)
var r0 []*datapb.VchannelInfo
var r1 []*datapb.SegmentInfo
var r2 error
if rf, ok := ret.Get(0).(func(context.Context, int64, ...int64) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error)); ok {
return rf(ctx, collectionID, partitionIDs...)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, ...int64) []*datapb.VchannelInfo); ok {
r0 = rf(ctx, collectionID, partitionIDs...)
} else {
@ -294,7 +339,6 @@ func (_m *MockBroker) GetRecoveryInfoV2(ctx context.Context, collectionID int64,
}
}
var r1 []*datapb.SegmentInfo
if rf, ok := ret.Get(1).(func(context.Context, int64, ...int64) []*datapb.SegmentInfo); ok {
r1 = rf(ctx, collectionID, partitionIDs...)
} else {
@ -303,7 +347,6 @@ func (_m *MockBroker) GetRecoveryInfoV2(ctx context.Context, collectionID int64,
}
}
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, int64, ...int64) error); ok {
r2 = rf(ctx, collectionID, partitionIDs...)
} else {
@ -319,9 +362,9 @@ type MockBroker_GetRecoveryInfoV2_Call struct {
}
// GetRecoveryInfoV2 is a helper method to define mock.On call
// - ctx context.Context
// - collectionID int64
// - partitionIDs ...int64
// - ctx context.Context
// - collectionID int64
// - partitionIDs ...int64
func (_e *MockBroker_Expecter) GetRecoveryInfoV2(ctx interface{}, collectionID interface{}, partitionIDs ...interface{}) *MockBroker_GetRecoveryInfoV2_Call {
return &MockBroker_GetRecoveryInfoV2_Call{Call: _e.mock.On("GetRecoveryInfoV2",
append([]interface{}{ctx, collectionID}, partitionIDs...)...)}
@ -345,6 +388,11 @@ func (_c *MockBroker_GetRecoveryInfoV2_Call) Return(_a0 []*datapb.VchannelInfo,
return _c
}
func (_c *MockBroker_GetRecoveryInfoV2_Call) RunAndReturn(run func(context.Context, int64, ...int64) ([]*datapb.VchannelInfo, []*datapb.SegmentInfo, error)) *MockBroker_GetRecoveryInfoV2_Call {
_c.Call.Return(run)
return _c
}
// GetSegmentInfo provides a mock function with given fields: ctx, segmentID
func (_m *MockBroker) GetSegmentInfo(ctx context.Context, segmentID ...int64) (*datapb.GetSegmentInfoResponse, error) {
_va := make([]interface{}, len(segmentID))
@ -357,6 +405,10 @@ func (_m *MockBroker) GetSegmentInfo(ctx context.Context, segmentID ...int64) (*
ret := _m.Called(_ca...)
var r0 *datapb.GetSegmentInfoResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, ...int64) (*datapb.GetSegmentInfoResponse, error)); ok {
return rf(ctx, segmentID...)
}
if rf, ok := ret.Get(0).(func(context.Context, ...int64) *datapb.GetSegmentInfoResponse); ok {
r0 = rf(ctx, segmentID...)
} else {
@ -365,7 +417,6 @@ func (_m *MockBroker) GetSegmentInfo(ctx context.Context, segmentID ...int64) (*
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, ...int64) error); ok {
r1 = rf(ctx, segmentID...)
} else {
@ -381,8 +432,8 @@ type MockBroker_GetSegmentInfo_Call struct {
}
// GetSegmentInfo is a helper method to define mock.On call
// - ctx context.Context
// - segmentID ...int64
// - ctx context.Context
// - segmentID ...int64
func (_e *MockBroker_Expecter) GetSegmentInfo(ctx interface{}, segmentID ...interface{}) *MockBroker_GetSegmentInfo_Call {
return &MockBroker_GetSegmentInfo_Call{Call: _e.mock.On("GetSegmentInfo",
append([]interface{}{ctx}, segmentID...)...)}
@ -406,13 +457,17 @@ func (_c *MockBroker_GetSegmentInfo_Call) Return(_a0 *datapb.GetSegmentInfoRespo
return _c
}
type mockConstructorTestingTNewMockBroker interface {
mock.TestingT
Cleanup(func())
func (_c *MockBroker_GetSegmentInfo_Call) RunAndReturn(run func(context.Context, ...int64) (*datapb.GetSegmentInfoResponse, error)) *MockBroker_GetSegmentInfo_Call {
_c.Call.Return(run)
return _c
}
// NewMockBroker creates a new instance of MockBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockBroker(t mockConstructorTestingTNewMockBroker) *MockBroker {
// The first argument is typically a *testing.T value.
func NewMockBroker(t interface {
mock.TestingT
Cleanup(func())
}) *MockBroker {
mock := &MockBroker{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocks
@ -34,6 +34,10 @@ func (_m *MockQueryNodeServer) Delete(_a0 context.Context, _a1 *querypb.DeleteRe
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.DeleteRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.DeleteRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -42,7 +46,6 @@ func (_m *MockQueryNodeServer) Delete(_a0 context.Context, _a1 *querypb.DeleteRe
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.DeleteRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -58,8 +61,8 @@ type MockQueryNodeServer_Delete_Call struct {
}
// Delete is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.DeleteRequest
// - _a0 context.Context
// - _a1 *querypb.DeleteRequest
func (_e *MockQueryNodeServer_Expecter) Delete(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_Delete_Call {
return &MockQueryNodeServer_Delete_Call{Call: _e.mock.On("Delete", _a0, _a1)}
}
@ -76,11 +79,20 @@ func (_c *MockQueryNodeServer_Delete_Call) Return(_a0 *commonpb.Status, _a1 erro
return _c
}
func (_c *MockQueryNodeServer_Delete_Call) RunAndReturn(run func(context.Context, *querypb.DeleteRequest) (*commonpb.Status, error)) *MockQueryNodeServer_Delete_Call {
_c.Call.Return(run)
return _c
}
// GetComponentStates provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) GetComponentStates(_a0 context.Context, _a1 *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) {
ret := _m.Called(_a0, _a1)
var r0 *milvuspb.ComponentStates
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetComponentStatesRequest) *milvuspb.ComponentStates); ok {
r0 = rf(_a0, _a1)
} else {
@ -89,7 +101,6 @@ func (_m *MockQueryNodeServer) GetComponentStates(_a0 context.Context, _a1 *milv
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetComponentStatesRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -105,8 +116,8 @@ type MockQueryNodeServer_GetComponentStates_Call struct {
}
// GetComponentStates is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *milvuspb.GetComponentStatesRequest
// - _a0 context.Context
// - _a1 *milvuspb.GetComponentStatesRequest
func (_e *MockQueryNodeServer_Expecter) GetComponentStates(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_GetComponentStates_Call {
return &MockQueryNodeServer_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", _a0, _a1)}
}
@ -123,11 +134,20 @@ func (_c *MockQueryNodeServer_GetComponentStates_Call) Return(_a0 *milvuspb.Comp
return _c
}
func (_c *MockQueryNodeServer_GetComponentStates_Call) RunAndReturn(run func(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)) *MockQueryNodeServer_GetComponentStates_Call {
_c.Call.Return(run)
return _c
}
// GetDataDistribution provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) GetDataDistribution(_a0 context.Context, _a1 *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *querypb.GetDataDistributionResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetDataDistributionRequest) *querypb.GetDataDistributionResponse); ok {
r0 = rf(_a0, _a1)
} else {
@ -136,7 +156,6 @@ func (_m *MockQueryNodeServer) GetDataDistribution(_a0 context.Context, _a1 *que
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetDataDistributionRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -152,8 +171,8 @@ type MockQueryNodeServer_GetDataDistribution_Call struct {
}
// GetDataDistribution is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.GetDataDistributionRequest
// - _a0 context.Context
// - _a1 *querypb.GetDataDistributionRequest
func (_e *MockQueryNodeServer_Expecter) GetDataDistribution(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_GetDataDistribution_Call {
return &MockQueryNodeServer_GetDataDistribution_Call{Call: _e.mock.On("GetDataDistribution", _a0, _a1)}
}
@ -170,11 +189,20 @@ func (_c *MockQueryNodeServer_GetDataDistribution_Call) Return(_a0 *querypb.GetD
return _c
}
func (_c *MockQueryNodeServer_GetDataDistribution_Call) RunAndReturn(run func(context.Context, *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)) *MockQueryNodeServer_GetDataDistribution_Call {
_c.Call.Return(run)
return _c
}
// GetMetrics provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) GetMetrics(_a0 context.Context, _a1 *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *milvuspb.GetMetricsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) *milvuspb.GetMetricsResponse); ok {
r0 = rf(_a0, _a1)
} else {
@ -183,7 +211,6 @@ func (_m *MockQueryNodeServer) GetMetrics(_a0 context.Context, _a1 *milvuspb.Get
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetMetricsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -199,8 +226,8 @@ type MockQueryNodeServer_GetMetrics_Call struct {
}
// GetMetrics is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *milvuspb.GetMetricsRequest
// - _a0 context.Context
// - _a1 *milvuspb.GetMetricsRequest
func (_e *MockQueryNodeServer_Expecter) GetMetrics(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_GetMetrics_Call {
return &MockQueryNodeServer_GetMetrics_Call{Call: _e.mock.On("GetMetrics", _a0, _a1)}
}
@ -217,11 +244,20 @@ func (_c *MockQueryNodeServer_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsRe
return _c
}
func (_c *MockQueryNodeServer_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *MockQueryNodeServer_GetMetrics_Call {
_c.Call.Return(run)
return _c
}
// GetSegmentInfo provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) GetSegmentInfo(_a0 context.Context, _a1 *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *querypb.GetSegmentInfoResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetSegmentInfoRequest) *querypb.GetSegmentInfoResponse); ok {
r0 = rf(_a0, _a1)
} else {
@ -230,7 +266,6 @@ func (_m *MockQueryNodeServer) GetSegmentInfo(_a0 context.Context, _a1 *querypb.
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetSegmentInfoRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -246,8 +281,8 @@ type MockQueryNodeServer_GetSegmentInfo_Call struct {
}
// GetSegmentInfo is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.GetSegmentInfoRequest
// - _a0 context.Context
// - _a1 *querypb.GetSegmentInfoRequest
func (_e *MockQueryNodeServer_Expecter) GetSegmentInfo(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_GetSegmentInfo_Call {
return &MockQueryNodeServer_GetSegmentInfo_Call{Call: _e.mock.On("GetSegmentInfo", _a0, _a1)}
}
@ -264,11 +299,20 @@ func (_c *MockQueryNodeServer_GetSegmentInfo_Call) Return(_a0 *querypb.GetSegmen
return _c
}
func (_c *MockQueryNodeServer_GetSegmentInfo_Call) RunAndReturn(run func(context.Context, *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error)) *MockQueryNodeServer_GetSegmentInfo_Call {
_c.Call.Return(run)
return _c
}
// GetStatistics provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) GetStatistics(_a0 context.Context, _a1 *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.GetStatisticsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetStatisticsRequest) *internalpb.GetStatisticsResponse); ok {
r0 = rf(_a0, _a1)
} else {
@ -277,7 +321,6 @@ func (_m *MockQueryNodeServer) GetStatistics(_a0 context.Context, _a1 *querypb.G
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetStatisticsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -293,8 +336,8 @@ type MockQueryNodeServer_GetStatistics_Call struct {
}
// GetStatistics is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.GetStatisticsRequest
// - _a0 context.Context
// - _a1 *querypb.GetStatisticsRequest
func (_e *MockQueryNodeServer_Expecter) GetStatistics(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_GetStatistics_Call {
return &MockQueryNodeServer_GetStatistics_Call{Call: _e.mock.On("GetStatistics", _a0, _a1)}
}
@ -311,11 +354,20 @@ func (_c *MockQueryNodeServer_GetStatistics_Call) Return(_a0 *internalpb.GetStat
return _c
}
func (_c *MockQueryNodeServer_GetStatistics_Call) RunAndReturn(run func(context.Context, *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)) *MockQueryNodeServer_GetStatistics_Call {
_c.Call.Return(run)
return _c
}
// GetStatisticsChannel provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) GetStatisticsChannel(_a0 context.Context, _a1 *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *milvuspb.StringResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetStatisticsChannelRequest) *milvuspb.StringResponse); ok {
r0 = rf(_a0, _a1)
} else {
@ -324,7 +376,6 @@ func (_m *MockQueryNodeServer) GetStatisticsChannel(_a0 context.Context, _a1 *in
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetStatisticsChannelRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -340,8 +391,8 @@ type MockQueryNodeServer_GetStatisticsChannel_Call struct {
}
// GetStatisticsChannel is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *internalpb.GetStatisticsChannelRequest
// - _a0 context.Context
// - _a1 *internalpb.GetStatisticsChannelRequest
func (_e *MockQueryNodeServer_Expecter) GetStatisticsChannel(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_GetStatisticsChannel_Call {
return &MockQueryNodeServer_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", _a0, _a1)}
}
@ -358,11 +409,20 @@ func (_c *MockQueryNodeServer_GetStatisticsChannel_Call) Return(_a0 *milvuspb.St
return _c
}
func (_c *MockQueryNodeServer_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)) *MockQueryNodeServer_GetStatisticsChannel_Call {
_c.Call.Return(run)
return _c
}
// GetTimeTickChannel provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) GetTimeTickChannel(_a0 context.Context, _a1 *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *milvuspb.StringResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetTimeTickChannelRequest) *milvuspb.StringResponse); ok {
r0 = rf(_a0, _a1)
} else {
@ -371,7 +431,6 @@ func (_m *MockQueryNodeServer) GetTimeTickChannel(_a0 context.Context, _a1 *inte
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetTimeTickChannelRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -387,8 +446,8 @@ type MockQueryNodeServer_GetTimeTickChannel_Call struct {
}
// GetTimeTickChannel is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *internalpb.GetTimeTickChannelRequest
// - _a0 context.Context
// - _a1 *internalpb.GetTimeTickChannelRequest
func (_e *MockQueryNodeServer_Expecter) GetTimeTickChannel(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_GetTimeTickChannel_Call {
return &MockQueryNodeServer_GetTimeTickChannel_Call{Call: _e.mock.On("GetTimeTickChannel", _a0, _a1)}
}
@ -405,11 +464,20 @@ func (_c *MockQueryNodeServer_GetTimeTickChannel_Call) Return(_a0 *milvuspb.Stri
return _c
}
func (_c *MockQueryNodeServer_GetTimeTickChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)) *MockQueryNodeServer_GetTimeTickChannel_Call {
_c.Call.Return(run)
return _c
}
// LoadPartitions provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) LoadPartitions(_a0 context.Context, _a1 *querypb.LoadPartitionsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadPartitionsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadPartitionsRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -418,7 +486,6 @@ func (_m *MockQueryNodeServer) LoadPartitions(_a0 context.Context, _a1 *querypb.
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.LoadPartitionsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -434,8 +501,8 @@ type MockQueryNodeServer_LoadPartitions_Call struct {
}
// LoadPartitions is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.LoadPartitionsRequest
// - _a0 context.Context
// - _a1 *querypb.LoadPartitionsRequest
func (_e *MockQueryNodeServer_Expecter) LoadPartitions(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_LoadPartitions_Call {
return &MockQueryNodeServer_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", _a0, _a1)}
}
@ -452,11 +519,20 @@ func (_c *MockQueryNodeServer_LoadPartitions_Call) Return(_a0 *commonpb.Status,
return _c
}
func (_c *MockQueryNodeServer_LoadPartitions_Call) RunAndReturn(run func(context.Context, *querypb.LoadPartitionsRequest) (*commonpb.Status, error)) *MockQueryNodeServer_LoadPartitions_Call {
_c.Call.Return(run)
return _c
}
// LoadSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) LoadSegments(_a0 context.Context, _a1 *querypb.LoadSegmentsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadSegmentsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.LoadSegmentsRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -465,7 +541,6 @@ func (_m *MockQueryNodeServer) LoadSegments(_a0 context.Context, _a1 *querypb.Lo
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.LoadSegmentsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -481,8 +556,8 @@ type MockQueryNodeServer_LoadSegments_Call struct {
}
// LoadSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.LoadSegmentsRequest
// - _a0 context.Context
// - _a1 *querypb.LoadSegmentsRequest
func (_e *MockQueryNodeServer_Expecter) LoadSegments(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_LoadSegments_Call {
return &MockQueryNodeServer_LoadSegments_Call{Call: _e.mock.On("LoadSegments", _a0, _a1)}
}
@ -499,11 +574,20 @@ func (_c *MockQueryNodeServer_LoadSegments_Call) Return(_a0 *commonpb.Status, _a
return _c
}
func (_c *MockQueryNodeServer_LoadSegments_Call) RunAndReturn(run func(context.Context, *querypb.LoadSegmentsRequest) (*commonpb.Status, error)) *MockQueryNodeServer_LoadSegments_Call {
_c.Call.Return(run)
return _c
}
// Query provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) Query(_a0 context.Context, _a1 *querypb.QueryRequest) (*internalpb.RetrieveResults, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.RetrieveResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) *internalpb.RetrieveResults); ok {
r0 = rf(_a0, _a1)
} else {
@ -512,7 +596,6 @@ func (_m *MockQueryNodeServer) Query(_a0 context.Context, _a1 *querypb.QueryRequ
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.QueryRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -528,8 +611,8 @@ type MockQueryNodeServer_Query_Call struct {
}
// Query is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.QueryRequest
// - _a0 context.Context
// - _a1 *querypb.QueryRequest
func (_e *MockQueryNodeServer_Expecter) Query(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_Query_Call {
return &MockQueryNodeServer_Query_Call{Call: _e.mock.On("Query", _a0, _a1)}
}
@ -546,11 +629,20 @@ func (_c *MockQueryNodeServer_Query_Call) Return(_a0 *internalpb.RetrieveResults
return _c
}
func (_c *MockQueryNodeServer_Query_Call) RunAndReturn(run func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)) *MockQueryNodeServer_Query_Call {
_c.Call.Return(run)
return _c
}
// QuerySegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) QuerySegments(_a0 context.Context, _a1 *querypb.QueryRequest) (*internalpb.RetrieveResults, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.RetrieveResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) *internalpb.RetrieveResults); ok {
r0 = rf(_a0, _a1)
} else {
@ -559,7 +651,6 @@ func (_m *MockQueryNodeServer) QuerySegments(_a0 context.Context, _a1 *querypb.Q
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.QueryRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -575,8 +666,8 @@ type MockQueryNodeServer_QuerySegments_Call struct {
}
// QuerySegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.QueryRequest
// - _a0 context.Context
// - _a1 *querypb.QueryRequest
func (_e *MockQueryNodeServer_Expecter) QuerySegments(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_QuerySegments_Call {
return &MockQueryNodeServer_QuerySegments_Call{Call: _e.mock.On("QuerySegments", _a0, _a1)}
}
@ -593,11 +684,20 @@ func (_c *MockQueryNodeServer_QuerySegments_Call) Return(_a0 *internalpb.Retriev
return _c
}
func (_c *MockQueryNodeServer_QuerySegments_Call) RunAndReturn(run func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)) *MockQueryNodeServer_QuerySegments_Call {
_c.Call.Return(run)
return _c
}
// ReleaseCollection provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) ReleaseCollection(_a0 context.Context, _a1 *querypb.ReleaseCollectionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseCollectionRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -606,7 +706,6 @@ func (_m *MockQueryNodeServer) ReleaseCollection(_a0 context.Context, _a1 *query
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ReleaseCollectionRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -622,8 +721,8 @@ type MockQueryNodeServer_ReleaseCollection_Call struct {
}
// ReleaseCollection is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.ReleaseCollectionRequest
// - _a0 context.Context
// - _a1 *querypb.ReleaseCollectionRequest
func (_e *MockQueryNodeServer_Expecter) ReleaseCollection(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_ReleaseCollection_Call {
return &MockQueryNodeServer_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", _a0, _a1)}
}
@ -640,11 +739,20 @@ func (_c *MockQueryNodeServer_ReleaseCollection_Call) Return(_a0 *commonpb.Statu
return _c
}
func (_c *MockQueryNodeServer_ReleaseCollection_Call) RunAndReturn(run func(context.Context, *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)) *MockQueryNodeServer_ReleaseCollection_Call {
_c.Call.Return(run)
return _c
}
// ReleasePartitions provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) ReleasePartitions(_a0 context.Context, _a1 *querypb.ReleasePartitionsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleasePartitionsRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -653,7 +761,6 @@ func (_m *MockQueryNodeServer) ReleasePartitions(_a0 context.Context, _a1 *query
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ReleasePartitionsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -669,8 +776,8 @@ type MockQueryNodeServer_ReleasePartitions_Call struct {
}
// ReleasePartitions is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.ReleasePartitionsRequest
// - _a0 context.Context
// - _a1 *querypb.ReleasePartitionsRequest
func (_e *MockQueryNodeServer_Expecter) ReleasePartitions(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_ReleasePartitions_Call {
return &MockQueryNodeServer_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", _a0, _a1)}
}
@ -687,11 +794,20 @@ func (_c *MockQueryNodeServer_ReleasePartitions_Call) Return(_a0 *commonpb.Statu
return _c
}
func (_c *MockQueryNodeServer_ReleasePartitions_Call) RunAndReturn(run func(context.Context, *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)) *MockQueryNodeServer_ReleasePartitions_Call {
_c.Call.Return(run)
return _c
}
// ReleaseSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) ReleaseSegments(_a0 context.Context, _a1 *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.ReleaseSegmentsRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -700,7 +816,6 @@ func (_m *MockQueryNodeServer) ReleaseSegments(_a0 context.Context, _a1 *querypb
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.ReleaseSegmentsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -716,8 +831,8 @@ type MockQueryNodeServer_ReleaseSegments_Call struct {
}
// ReleaseSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.ReleaseSegmentsRequest
// - _a0 context.Context
// - _a1 *querypb.ReleaseSegmentsRequest
func (_e *MockQueryNodeServer_Expecter) ReleaseSegments(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_ReleaseSegments_Call {
return &MockQueryNodeServer_ReleaseSegments_Call{Call: _e.mock.On("ReleaseSegments", _a0, _a1)}
}
@ -734,11 +849,20 @@ func (_c *MockQueryNodeServer_ReleaseSegments_Call) Return(_a0 *commonpb.Status,
return _c
}
func (_c *MockQueryNodeServer_ReleaseSegments_Call) RunAndReturn(run func(context.Context, *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)) *MockQueryNodeServer_ReleaseSegments_Call {
_c.Call.Return(run)
return _c
}
// Search provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) Search(_a0 context.Context, _a1 *querypb.SearchRequest) (*internalpb.SearchResults, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.SearchResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) *internalpb.SearchResults); ok {
r0 = rf(_a0, _a1)
} else {
@ -747,7 +871,6 @@ func (_m *MockQueryNodeServer) Search(_a0 context.Context, _a1 *querypb.SearchRe
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SearchRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -763,8 +886,8 @@ type MockQueryNodeServer_Search_Call struct {
}
// Search is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.SearchRequest
// - _a0 context.Context
// - _a1 *querypb.SearchRequest
func (_e *MockQueryNodeServer_Expecter) Search(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_Search_Call {
return &MockQueryNodeServer_Search_Call{Call: _e.mock.On("Search", _a0, _a1)}
}
@ -781,11 +904,20 @@ func (_c *MockQueryNodeServer_Search_Call) Return(_a0 *internalpb.SearchResults,
return _c
}
func (_c *MockQueryNodeServer_Search_Call) RunAndReturn(run func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)) *MockQueryNodeServer_Search_Call {
_c.Call.Return(run)
return _c
}
// SearchSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) SearchSegments(_a0 context.Context, _a1 *querypb.SearchRequest) (*internalpb.SearchResults, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.SearchResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) *internalpb.SearchResults); ok {
r0 = rf(_a0, _a1)
} else {
@ -794,7 +926,6 @@ func (_m *MockQueryNodeServer) SearchSegments(_a0 context.Context, _a1 *querypb.
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SearchRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -810,8 +941,8 @@ type MockQueryNodeServer_SearchSegments_Call struct {
}
// SearchSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.SearchRequest
// - _a0 context.Context
// - _a1 *querypb.SearchRequest
func (_e *MockQueryNodeServer_Expecter) SearchSegments(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_SearchSegments_Call {
return &MockQueryNodeServer_SearchSegments_Call{Call: _e.mock.On("SearchSegments", _a0, _a1)}
}
@ -828,11 +959,20 @@ func (_c *MockQueryNodeServer_SearchSegments_Call) Return(_a0 *internalpb.Search
return _c
}
func (_c *MockQueryNodeServer_SearchSegments_Call) RunAndReturn(run func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)) *MockQueryNodeServer_SearchSegments_Call {
_c.Call.Return(run)
return _c
}
// ShowConfigurations provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) ShowConfigurations(_a0 context.Context, _a1 *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error) {
ret := _m.Called(_a0, _a1)
var r0 *internalpb.ShowConfigurationsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *internalpb.ShowConfigurationsRequest) *internalpb.ShowConfigurationsResponse); ok {
r0 = rf(_a0, _a1)
} else {
@ -841,7 +981,6 @@ func (_m *MockQueryNodeServer) ShowConfigurations(_a0 context.Context, _a1 *inte
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *internalpb.ShowConfigurationsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -857,8 +996,8 @@ type MockQueryNodeServer_ShowConfigurations_Call struct {
}
// ShowConfigurations is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *internalpb.ShowConfigurationsRequest
// - _a0 context.Context
// - _a1 *internalpb.ShowConfigurationsRequest
func (_e *MockQueryNodeServer_Expecter) ShowConfigurations(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_ShowConfigurations_Call {
return &MockQueryNodeServer_ShowConfigurations_Call{Call: _e.mock.On("ShowConfigurations", _a0, _a1)}
}
@ -875,11 +1014,20 @@ func (_c *MockQueryNodeServer_ShowConfigurations_Call) Return(_a0 *internalpb.Sh
return _c
}
func (_c *MockQueryNodeServer_ShowConfigurations_Call) RunAndReturn(run func(context.Context, *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)) *MockQueryNodeServer_ShowConfigurations_Call {
_c.Call.Return(run)
return _c
}
// SyncDistribution provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) SyncDistribution(_a0 context.Context, _a1 *querypb.SyncDistributionRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncDistributionRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncDistributionRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -888,7 +1036,6 @@ func (_m *MockQueryNodeServer) SyncDistribution(_a0 context.Context, _a1 *queryp
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SyncDistributionRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -904,8 +1051,8 @@ type MockQueryNodeServer_SyncDistribution_Call struct {
}
// SyncDistribution is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.SyncDistributionRequest
// - _a0 context.Context
// - _a1 *querypb.SyncDistributionRequest
func (_e *MockQueryNodeServer_Expecter) SyncDistribution(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_SyncDistribution_Call {
return &MockQueryNodeServer_SyncDistribution_Call{Call: _e.mock.On("SyncDistribution", _a0, _a1)}
}
@ -922,11 +1069,20 @@ func (_c *MockQueryNodeServer_SyncDistribution_Call) Return(_a0 *commonpb.Status
return _c
}
func (_c *MockQueryNodeServer_SyncDistribution_Call) RunAndReturn(run func(context.Context, *querypb.SyncDistributionRequest) (*commonpb.Status, error)) *MockQueryNodeServer_SyncDistribution_Call {
_c.Call.Return(run)
return _c
}
// SyncReplicaSegments provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) SyncReplicaSegments(_a0 context.Context, _a1 *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SyncReplicaSegmentsRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -935,7 +1091,6 @@ func (_m *MockQueryNodeServer) SyncReplicaSegments(_a0 context.Context, _a1 *que
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SyncReplicaSegmentsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -951,8 +1106,8 @@ type MockQueryNodeServer_SyncReplicaSegments_Call struct {
}
// SyncReplicaSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.SyncReplicaSegmentsRequest
// - _a0 context.Context
// - _a1 *querypb.SyncReplicaSegmentsRequest
func (_e *MockQueryNodeServer_Expecter) SyncReplicaSegments(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_SyncReplicaSegments_Call {
return &MockQueryNodeServer_SyncReplicaSegments_Call{Call: _e.mock.On("SyncReplicaSegments", _a0, _a1)}
}
@ -969,11 +1124,20 @@ func (_c *MockQueryNodeServer_SyncReplicaSegments_Call) Return(_a0 *commonpb.Sta
return _c
}
func (_c *MockQueryNodeServer_SyncReplicaSegments_Call) RunAndReturn(run func(context.Context, *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error)) *MockQueryNodeServer_SyncReplicaSegments_Call {
_c.Call.Return(run)
return _c
}
// UnsubDmChannel provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) UnsubDmChannel(_a0 context.Context, _a1 *querypb.UnsubDmChannelRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.UnsubDmChannelRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -982,7 +1146,6 @@ func (_m *MockQueryNodeServer) UnsubDmChannel(_a0 context.Context, _a1 *querypb.
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.UnsubDmChannelRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -998,8 +1161,8 @@ type MockQueryNodeServer_UnsubDmChannel_Call struct {
}
// UnsubDmChannel is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.UnsubDmChannelRequest
// - _a0 context.Context
// - _a1 *querypb.UnsubDmChannelRequest
func (_e *MockQueryNodeServer_Expecter) UnsubDmChannel(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_UnsubDmChannel_Call {
return &MockQueryNodeServer_UnsubDmChannel_Call{Call: _e.mock.On("UnsubDmChannel", _a0, _a1)}
}
@ -1016,11 +1179,20 @@ func (_c *MockQueryNodeServer_UnsubDmChannel_Call) Return(_a0 *commonpb.Status,
return _c
}
func (_c *MockQueryNodeServer_UnsubDmChannel_Call) RunAndReturn(run func(context.Context, *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)) *MockQueryNodeServer_UnsubDmChannel_Call {
_c.Call.Return(run)
return _c
}
// WatchDmChannels provides a mock function with given fields: _a0, _a1
func (_m *MockQueryNodeServer) WatchDmChannels(_a0 context.Context, _a1 *querypb.WatchDmChannelsRequest) (*commonpb.Status, error) {
ret := _m.Called(_a0, _a1)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.WatchDmChannelsRequest) *commonpb.Status); ok {
r0 = rf(_a0, _a1)
} else {
@ -1029,7 +1201,6 @@ func (_m *MockQueryNodeServer) WatchDmChannels(_a0 context.Context, _a1 *querypb
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.WatchDmChannelsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
@ -1045,8 +1216,8 @@ type MockQueryNodeServer_WatchDmChannels_Call struct {
}
// WatchDmChannels is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.WatchDmChannelsRequest
// - _a0 context.Context
// - _a1 *querypb.WatchDmChannelsRequest
func (_e *MockQueryNodeServer_Expecter) WatchDmChannels(_a0 interface{}, _a1 interface{}) *MockQueryNodeServer_WatchDmChannels_Call {
return &MockQueryNodeServer_WatchDmChannels_Call{Call: _e.mock.On("WatchDmChannels", _a0, _a1)}
}
@ -1063,13 +1234,17 @@ func (_c *MockQueryNodeServer_WatchDmChannels_Call) Return(_a0 *commonpb.Status,
return _c
}
type mockConstructorTestingTNewMockQueryNodeServer interface {
mock.TestingT
Cleanup(func())
func (_c *MockQueryNodeServer_WatchDmChannels_Call) RunAndReturn(run func(context.Context, *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)) *MockQueryNodeServer_WatchDmChannels_Call {
_c.Call.Return(run)
return _c
}
// NewMockQueryNodeServer creates a new instance of MockQueryNodeServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockQueryNodeServer(t mockConstructorTestingTNewMockQueryNodeServer) *MockQueryNodeServer {
// The first argument is typically a *testing.T value.
func NewMockQueryNodeServer(t interface {
mock.TestingT
Cleanup(func())
}) *MockQueryNodeServer {
mock := &MockQueryNodeServer{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package session
@ -32,6 +32,10 @@ func (_m *MockCluster) GetComponentStates(ctx context.Context, nodeID int64) (*m
ret := _m.Called(ctx, nodeID)
var r0 *milvuspb.ComponentStates
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (*milvuspb.ComponentStates, error)); ok {
return rf(ctx, nodeID)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *milvuspb.ComponentStates); ok {
r0 = rf(ctx, nodeID)
} else {
@ -40,7 +44,6 @@ func (_m *MockCluster) GetComponentStates(ctx context.Context, nodeID int64) (*m
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, nodeID)
} else {
@ -56,8 +59,8 @@ type MockCluster_GetComponentStates_Call struct {
}
// GetComponentStates is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - ctx context.Context
// - nodeID int64
func (_e *MockCluster_Expecter) GetComponentStates(ctx interface{}, nodeID interface{}) *MockCluster_GetComponentStates_Call {
return &MockCluster_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", ctx, nodeID)}
}
@ -74,11 +77,20 @@ func (_c *MockCluster_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentSta
return _c
}
func (_c *MockCluster_GetComponentStates_Call) RunAndReturn(run func(context.Context, int64) (*milvuspb.ComponentStates, error)) *MockCluster_GetComponentStates_Call {
_c.Call.Return(run)
return _c
}
// GetDataDistribution provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) GetDataDistribution(ctx context.Context, nodeID int64, req *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *querypb.GetDataDistributionResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.GetDataDistributionRequest) *querypb.GetDataDistributionResponse); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -87,7 +99,6 @@ func (_m *MockCluster) GetDataDistribution(ctx context.Context, nodeID int64, re
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *querypb.GetDataDistributionRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -103,9 +114,9 @@ type MockCluster_GetDataDistribution_Call struct {
}
// GetDataDistribution is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *querypb.GetDataDistributionRequest
// - ctx context.Context
// - nodeID int64
// - req *querypb.GetDataDistributionRequest
func (_e *MockCluster_Expecter) GetDataDistribution(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_GetDataDistribution_Call {
return &MockCluster_GetDataDistribution_Call{Call: _e.mock.On("GetDataDistribution", ctx, nodeID, req)}
}
@ -122,11 +133,20 @@ func (_c *MockCluster_GetDataDistribution_Call) Return(_a0 *querypb.GetDataDistr
return _c
}
func (_c *MockCluster_GetDataDistribution_Call) RunAndReturn(run func(context.Context, int64, *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)) *MockCluster_GetDataDistribution_Call {
_c.Call.Return(run)
return _c
}
// GetMetrics provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) GetMetrics(ctx context.Context, nodeID int64, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *milvuspb.GetMetricsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *milvuspb.GetMetricsRequest) *milvuspb.GetMetricsResponse); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -135,7 +155,6 @@ func (_m *MockCluster) GetMetrics(ctx context.Context, nodeID int64, req *milvus
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *milvuspb.GetMetricsRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -151,9 +170,9 @@ type MockCluster_GetMetrics_Call struct {
}
// GetMetrics is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *milvuspb.GetMetricsRequest
// - ctx context.Context
// - nodeID int64
// - req *milvuspb.GetMetricsRequest
func (_e *MockCluster_Expecter) GetMetrics(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_GetMetrics_Call {
return &MockCluster_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, nodeID, req)}
}
@ -170,11 +189,20 @@ func (_c *MockCluster_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse,
return _c
}
func (_c *MockCluster_GetMetrics_Call) RunAndReturn(run func(context.Context, int64, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *MockCluster_GetMetrics_Call {
_c.Call.Return(run)
return _c
}
// LoadPartitions provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) LoadPartitions(ctx context.Context, nodeID int64, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.LoadPartitionsRequest) (*commonpb.Status, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.LoadPartitionsRequest) *commonpb.Status); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -183,7 +211,6 @@ func (_m *MockCluster) LoadPartitions(ctx context.Context, nodeID int64, req *qu
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *querypb.LoadPartitionsRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -199,9 +226,9 @@ type MockCluster_LoadPartitions_Call struct {
}
// LoadPartitions is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *querypb.LoadPartitionsRequest
// - ctx context.Context
// - nodeID int64
// - req *querypb.LoadPartitionsRequest
func (_e *MockCluster_Expecter) LoadPartitions(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_LoadPartitions_Call {
return &MockCluster_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", ctx, nodeID, req)}
}
@ -218,11 +245,20 @@ func (_c *MockCluster_LoadPartitions_Call) Return(_a0 *commonpb.Status, _a1 erro
return _c
}
func (_c *MockCluster_LoadPartitions_Call) RunAndReturn(run func(context.Context, int64, *querypb.LoadPartitionsRequest) (*commonpb.Status, error)) *MockCluster_LoadPartitions_Call {
_c.Call.Return(run)
return _c
}
// LoadSegments provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) LoadSegments(ctx context.Context, nodeID int64, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.LoadSegmentsRequest) (*commonpb.Status, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.LoadSegmentsRequest) *commonpb.Status); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -231,7 +267,6 @@ func (_m *MockCluster) LoadSegments(ctx context.Context, nodeID int64, req *quer
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *querypb.LoadSegmentsRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -247,9 +282,9 @@ type MockCluster_LoadSegments_Call struct {
}
// LoadSegments is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *querypb.LoadSegmentsRequest
// - ctx context.Context
// - nodeID int64
// - req *querypb.LoadSegmentsRequest
func (_e *MockCluster_Expecter) LoadSegments(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_LoadSegments_Call {
return &MockCluster_LoadSegments_Call{Call: _e.mock.On("LoadSegments", ctx, nodeID, req)}
}
@ -266,11 +301,20 @@ func (_c *MockCluster_LoadSegments_Call) Return(_a0 *commonpb.Status, _a1 error)
return _c
}
func (_c *MockCluster_LoadSegments_Call) RunAndReturn(run func(context.Context, int64, *querypb.LoadSegmentsRequest) (*commonpb.Status, error)) *MockCluster_LoadSegments_Call {
_c.Call.Return(run)
return _c
}
// ReleasePartitions provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) ReleasePartitions(ctx context.Context, nodeID int64, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.ReleasePartitionsRequest) *commonpb.Status); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -279,7 +323,6 @@ func (_m *MockCluster) ReleasePartitions(ctx context.Context, nodeID int64, req
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *querypb.ReleasePartitionsRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -295,9 +338,9 @@ type MockCluster_ReleasePartitions_Call struct {
}
// ReleasePartitions is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *querypb.ReleasePartitionsRequest
// - ctx context.Context
// - nodeID int64
// - req *querypb.ReleasePartitionsRequest
func (_e *MockCluster_Expecter) ReleasePartitions(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_ReleasePartitions_Call {
return &MockCluster_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", ctx, nodeID, req)}
}
@ -314,11 +357,20 @@ func (_c *MockCluster_ReleasePartitions_Call) Return(_a0 *commonpb.Status, _a1 e
return _c
}
func (_c *MockCluster_ReleasePartitions_Call) RunAndReturn(run func(context.Context, int64, *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)) *MockCluster_ReleasePartitions_Call {
_c.Call.Return(run)
return _c
}
// ReleaseSegments provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) ReleaseSegments(ctx context.Context, nodeID int64, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.ReleaseSegmentsRequest) *commonpb.Status); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -327,7 +379,6 @@ func (_m *MockCluster) ReleaseSegments(ctx context.Context, nodeID int64, req *q
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *querypb.ReleaseSegmentsRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -343,9 +394,9 @@ type MockCluster_ReleaseSegments_Call struct {
}
// ReleaseSegments is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *querypb.ReleaseSegmentsRequest
// - ctx context.Context
// - nodeID int64
// - req *querypb.ReleaseSegmentsRequest
func (_e *MockCluster_Expecter) ReleaseSegments(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_ReleaseSegments_Call {
return &MockCluster_ReleaseSegments_Call{Call: _e.mock.On("ReleaseSegments", ctx, nodeID, req)}
}
@ -362,6 +413,11 @@ func (_c *MockCluster_ReleaseSegments_Call) Return(_a0 *commonpb.Status, _a1 err
return _c
}
func (_c *MockCluster_ReleaseSegments_Call) RunAndReturn(run func(context.Context, int64, *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)) *MockCluster_ReleaseSegments_Call {
_c.Call.Return(run)
return _c
}
// Start provides a mock function with given fields: ctx
func (_m *MockCluster) Start(ctx context.Context) {
_m.Called(ctx)
@ -373,7 +429,7 @@ type MockCluster_Start_Call struct {
}
// Start is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockCluster_Expecter) Start(ctx interface{}) *MockCluster_Start_Call {
return &MockCluster_Start_Call{Call: _e.mock.On("Start", ctx)}
}
@ -390,6 +446,11 @@ func (_c *MockCluster_Start_Call) Return() *MockCluster_Start_Call {
return _c
}
func (_c *MockCluster_Start_Call) RunAndReturn(run func(context.Context)) *MockCluster_Start_Call {
_c.Call.Return(run)
return _c
}
// Stop provides a mock function with given fields:
func (_m *MockCluster) Stop() {
_m.Called()
@ -417,11 +478,20 @@ func (_c *MockCluster_Stop_Call) Return() *MockCluster_Stop_Call {
return _c
}
func (_c *MockCluster_Stop_Call) RunAndReturn(run func()) *MockCluster_Stop_Call {
_c.Call.Return(run)
return _c
}
// SyncDistribution provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) SyncDistribution(ctx context.Context, nodeID int64, req *querypb.SyncDistributionRequest) (*commonpb.Status, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.SyncDistributionRequest) (*commonpb.Status, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.SyncDistributionRequest) *commonpb.Status); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -430,7 +500,6 @@ func (_m *MockCluster) SyncDistribution(ctx context.Context, nodeID int64, req *
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *querypb.SyncDistributionRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -446,9 +515,9 @@ type MockCluster_SyncDistribution_Call struct {
}
// SyncDistribution is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *querypb.SyncDistributionRequest
// - ctx context.Context
// - nodeID int64
// - req *querypb.SyncDistributionRequest
func (_e *MockCluster_Expecter) SyncDistribution(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_SyncDistribution_Call {
return &MockCluster_SyncDistribution_Call{Call: _e.mock.On("SyncDistribution", ctx, nodeID, req)}
}
@ -465,11 +534,20 @@ func (_c *MockCluster_SyncDistribution_Call) Return(_a0 *commonpb.Status, _a1 er
return _c
}
func (_c *MockCluster_SyncDistribution_Call) RunAndReturn(run func(context.Context, int64, *querypb.SyncDistributionRequest) (*commonpb.Status, error)) *MockCluster_SyncDistribution_Call {
_c.Call.Return(run)
return _c
}
// UnsubDmChannel provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) UnsubDmChannel(ctx context.Context, nodeID int64, req *querypb.UnsubDmChannelRequest) (*commonpb.Status, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.UnsubDmChannelRequest) *commonpb.Status); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -478,7 +556,6 @@ func (_m *MockCluster) UnsubDmChannel(ctx context.Context, nodeID int64, req *qu
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *querypb.UnsubDmChannelRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -494,9 +571,9 @@ type MockCluster_UnsubDmChannel_Call struct {
}
// UnsubDmChannel is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *querypb.UnsubDmChannelRequest
// - ctx context.Context
// - nodeID int64
// - req *querypb.UnsubDmChannelRequest
func (_e *MockCluster_Expecter) UnsubDmChannel(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_UnsubDmChannel_Call {
return &MockCluster_UnsubDmChannel_Call{Call: _e.mock.On("UnsubDmChannel", ctx, nodeID, req)}
}
@ -513,11 +590,20 @@ func (_c *MockCluster_UnsubDmChannel_Call) Return(_a0 *commonpb.Status, _a1 erro
return _c
}
func (_c *MockCluster_UnsubDmChannel_Call) RunAndReturn(run func(context.Context, int64, *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)) *MockCluster_UnsubDmChannel_Call {
_c.Call.Return(run)
return _c
}
// WatchDmChannels provides a mock function with given fields: ctx, nodeID, req
func (_m *MockCluster) WatchDmChannels(ctx context.Context, nodeID int64, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error) {
ret := _m.Called(ctx, nodeID, req)
var r0 *commonpb.Status
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)); ok {
return rf(ctx, nodeID, req)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, *querypb.WatchDmChannelsRequest) *commonpb.Status); ok {
r0 = rf(ctx, nodeID, req)
} else {
@ -526,7 +612,6 @@ func (_m *MockCluster) WatchDmChannels(ctx context.Context, nodeID int64, req *q
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int64, *querypb.WatchDmChannelsRequest) error); ok {
r1 = rf(ctx, nodeID, req)
} else {
@ -542,9 +627,9 @@ type MockCluster_WatchDmChannels_Call struct {
}
// WatchDmChannels is a helper method to define mock.On call
// - ctx context.Context
// - nodeID int64
// - req *querypb.WatchDmChannelsRequest
// - ctx context.Context
// - nodeID int64
// - req *querypb.WatchDmChannelsRequest
func (_e *MockCluster_Expecter) WatchDmChannels(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_WatchDmChannels_Call {
return &MockCluster_WatchDmChannels_Call{Call: _e.mock.On("WatchDmChannels", ctx, nodeID, req)}
}
@ -561,13 +646,17 @@ func (_c *MockCluster_WatchDmChannels_Call) Return(_a0 *commonpb.Status, _a1 err
return _c
}
type mockConstructorTestingTNewMockCluster interface {
mock.TestingT
Cleanup(func())
func (_c *MockCluster_WatchDmChannels_Call) RunAndReturn(run func(context.Context, int64, *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)) *MockCluster_WatchDmChannels_Call {
_c.Call.Return(run)
return _c
}
// NewMockCluster creates a new instance of MockCluster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockCluster(t mockConstructorTestingTNewMockCluster) *MockCluster {
// The first argument is typically a *testing.T value.
func NewMockCluster(t interface {
mock.TestingT
Cleanup(func())
}) *MockCluster {
mock := &MockCluster{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package task
@ -41,7 +41,7 @@ type MockScheduler_Add_Call struct {
}
// Add is a helper method to define mock.On call
// - task Task
// - task Task
func (_e *MockScheduler_Expecter) Add(task interface{}) *MockScheduler_Add_Call {
return &MockScheduler_Add_Call{Call: _e.mock.On("Add", task)}
}
@ -58,6 +58,11 @@ func (_c *MockScheduler_Add_Call) Return(_a0 error) *MockScheduler_Add_Call {
return _c
}
func (_c *MockScheduler_Add_Call) RunAndReturn(run func(Task) error) *MockScheduler_Add_Call {
_c.Call.Return(run)
return _c
}
// AddExecutor provides a mock function with given fields: nodeID
func (_m *MockScheduler) AddExecutor(nodeID int64) {
_m.Called(nodeID)
@ -69,7 +74,7 @@ type MockScheduler_AddExecutor_Call struct {
}
// AddExecutor is a helper method to define mock.On call
// - nodeID int64
// - nodeID int64
func (_e *MockScheduler_Expecter) AddExecutor(nodeID interface{}) *MockScheduler_AddExecutor_Call {
return &MockScheduler_AddExecutor_Call{Call: _e.mock.On("AddExecutor", nodeID)}
}
@ -86,6 +91,11 @@ func (_c *MockScheduler_AddExecutor_Call) Return() *MockScheduler_AddExecutor_Ca
return _c
}
func (_c *MockScheduler_AddExecutor_Call) RunAndReturn(run func(int64)) *MockScheduler_AddExecutor_Call {
_c.Call.Return(run)
return _c
}
// Dispatch provides a mock function with given fields: node
func (_m *MockScheduler) Dispatch(node int64) {
_m.Called(node)
@ -97,7 +107,7 @@ type MockScheduler_Dispatch_Call struct {
}
// Dispatch is a helper method to define mock.On call
// - node int64
// - node int64
func (_e *MockScheduler_Expecter) Dispatch(node interface{}) *MockScheduler_Dispatch_Call {
return &MockScheduler_Dispatch_Call{Call: _e.mock.On("Dispatch", node)}
}
@ -114,6 +124,11 @@ func (_c *MockScheduler_Dispatch_Call) Return() *MockScheduler_Dispatch_Call {
return _c
}
func (_c *MockScheduler_Dispatch_Call) RunAndReturn(run func(int64)) *MockScheduler_Dispatch_Call {
_c.Call.Return(run)
return _c
}
// GetChannelTaskNum provides a mock function with given fields:
func (_m *MockScheduler) GetChannelTaskNum() int {
ret := _m.Called()
@ -150,6 +165,11 @@ func (_c *MockScheduler_GetChannelTaskNum_Call) Return(_a0 int) *MockScheduler_G
return _c
}
func (_c *MockScheduler_GetChannelTaskNum_Call) RunAndReturn(run func() int) *MockScheduler_GetChannelTaskNum_Call {
_c.Call.Return(run)
return _c
}
// GetNodeChannelDelta provides a mock function with given fields: nodeID
func (_m *MockScheduler) GetNodeChannelDelta(nodeID int64) int {
ret := _m.Called(nodeID)
@ -170,7 +190,7 @@ type MockScheduler_GetNodeChannelDelta_Call struct {
}
// GetNodeChannelDelta is a helper method to define mock.On call
// - nodeID int64
// - nodeID int64
func (_e *MockScheduler_Expecter) GetNodeChannelDelta(nodeID interface{}) *MockScheduler_GetNodeChannelDelta_Call {
return &MockScheduler_GetNodeChannelDelta_Call{Call: _e.mock.On("GetNodeChannelDelta", nodeID)}
}
@ -187,6 +207,11 @@ func (_c *MockScheduler_GetNodeChannelDelta_Call) Return(_a0 int) *MockScheduler
return _c
}
func (_c *MockScheduler_GetNodeChannelDelta_Call) RunAndReturn(run func(int64) int) *MockScheduler_GetNodeChannelDelta_Call {
_c.Call.Return(run)
return _c
}
// GetNodeSegmentDelta provides a mock function with given fields: nodeID
func (_m *MockScheduler) GetNodeSegmentDelta(nodeID int64) int {
ret := _m.Called(nodeID)
@ -207,7 +232,7 @@ type MockScheduler_GetNodeSegmentDelta_Call struct {
}
// GetNodeSegmentDelta is a helper method to define mock.On call
// - nodeID int64
// - nodeID int64
func (_e *MockScheduler_Expecter) GetNodeSegmentDelta(nodeID interface{}) *MockScheduler_GetNodeSegmentDelta_Call {
return &MockScheduler_GetNodeSegmentDelta_Call{Call: _e.mock.On("GetNodeSegmentDelta", nodeID)}
}
@ -224,6 +249,11 @@ func (_c *MockScheduler_GetNodeSegmentDelta_Call) Return(_a0 int) *MockScheduler
return _c
}
func (_c *MockScheduler_GetNodeSegmentDelta_Call) RunAndReturn(run func(int64) int) *MockScheduler_GetNodeSegmentDelta_Call {
_c.Call.Return(run)
return _c
}
// GetSegmentTaskNum provides a mock function with given fields:
func (_m *MockScheduler) GetSegmentTaskNum() int {
ret := _m.Called()
@ -260,6 +290,11 @@ func (_c *MockScheduler_GetSegmentTaskNum_Call) Return(_a0 int) *MockScheduler_G
return _c
}
func (_c *MockScheduler_GetSegmentTaskNum_Call) RunAndReturn(run func() int) *MockScheduler_GetSegmentTaskNum_Call {
_c.Call.Return(run)
return _c
}
// RemoveByNode provides a mock function with given fields: node
func (_m *MockScheduler) RemoveByNode(node int64) {
_m.Called(node)
@ -271,7 +306,7 @@ type MockScheduler_RemoveByNode_Call struct {
}
// RemoveByNode is a helper method to define mock.On call
// - node int64
// - node int64
func (_e *MockScheduler_Expecter) RemoveByNode(node interface{}) *MockScheduler_RemoveByNode_Call {
return &MockScheduler_RemoveByNode_Call{Call: _e.mock.On("RemoveByNode", node)}
}
@ -288,6 +323,11 @@ func (_c *MockScheduler_RemoveByNode_Call) Return() *MockScheduler_RemoveByNode_
return _c
}
func (_c *MockScheduler_RemoveByNode_Call) RunAndReturn(run func(int64)) *MockScheduler_RemoveByNode_Call {
_c.Call.Return(run)
return _c
}
// RemoveExecutor provides a mock function with given fields: nodeID
func (_m *MockScheduler) RemoveExecutor(nodeID int64) {
_m.Called(nodeID)
@ -299,7 +339,7 @@ type MockScheduler_RemoveExecutor_Call struct {
}
// RemoveExecutor is a helper method to define mock.On call
// - nodeID int64
// - nodeID int64
func (_e *MockScheduler_Expecter) RemoveExecutor(nodeID interface{}) *MockScheduler_RemoveExecutor_Call {
return &MockScheduler_RemoveExecutor_Call{Call: _e.mock.On("RemoveExecutor", nodeID)}
}
@ -316,6 +356,11 @@ func (_c *MockScheduler_RemoveExecutor_Call) Return() *MockScheduler_RemoveExecu
return _c
}
func (_c *MockScheduler_RemoveExecutor_Call) RunAndReturn(run func(int64)) *MockScheduler_RemoveExecutor_Call {
_c.Call.Return(run)
return _c
}
// Start provides a mock function with given fields: ctx
func (_m *MockScheduler) Start(ctx context.Context) {
_m.Called(ctx)
@ -327,7 +372,7 @@ type MockScheduler_Start_Call struct {
}
// Start is a helper method to define mock.On call
// - ctx context.Context
// - ctx context.Context
func (_e *MockScheduler_Expecter) Start(ctx interface{}) *MockScheduler_Start_Call {
return &MockScheduler_Start_Call{Call: _e.mock.On("Start", ctx)}
}
@ -344,6 +389,11 @@ func (_c *MockScheduler_Start_Call) Return() *MockScheduler_Start_Call {
return _c
}
func (_c *MockScheduler_Start_Call) RunAndReturn(run func(context.Context)) *MockScheduler_Start_Call {
_c.Call.Return(run)
return _c
}
// Stop provides a mock function with given fields:
func (_m *MockScheduler) Stop() {
_m.Called()
@ -371,13 +421,17 @@ func (_c *MockScheduler_Stop_Call) Return() *MockScheduler_Stop_Call {
return _c
}
type mockConstructorTestingTNewMockScheduler interface {
mock.TestingT
Cleanup(func())
func (_c *MockScheduler_Stop_Call) RunAndReturn(run func()) *MockScheduler_Stop_Call {
_c.Call.Return(run)
return _c
}
// NewMockScheduler creates a new instance of MockScheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockScheduler(t mockConstructorTestingTNewMockScheduler) *MockScheduler {
// The first argument is typically a *testing.T value.
func NewMockScheduler(t interface {
mock.TestingT
Cleanup(func())
}) *MockScheduler {
mock := &MockScheduler{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.21.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package cluster
@ -71,13 +71,12 @@ func (_c *MockManager_GetWorker_Call) RunAndReturn(run func(int64) (Worker, erro
return _c
}
type mockConstructorTestingTNewMockManager interface {
// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockManager(t interface {
mock.TestingT
Cleanup(func())
}
// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockManager(t mockConstructorTestingTNewMockManager) *MockManager {
}) *MockManager {
mock := &MockManager{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package cluster
@ -44,8 +44,8 @@ type MockWorker_Delete_Call struct {
}
// Delete is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.DeleteRequest
// - ctx context.Context
// - req *querypb.DeleteRequest
func (_e *MockWorker_Expecter) Delete(ctx interface{}, req interface{}) *MockWorker_Delete_Call {
return &MockWorker_Delete_Call{Call: _e.mock.On("Delete", ctx, req)}
}
@ -62,11 +62,20 @@ func (_c *MockWorker_Delete_Call) Return(_a0 error) *MockWorker_Delete_Call {
return _c
}
func (_c *MockWorker_Delete_Call) RunAndReturn(run func(context.Context, *querypb.DeleteRequest) error) *MockWorker_Delete_Call {
_c.Call.Return(run)
return _c
}
// GetStatistics provides a mock function with given fields: ctx, req
func (_m *MockWorker) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error) {
ret := _m.Called(ctx, req)
var r0 *internalpb.GetStatisticsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)); ok {
return rf(ctx, req)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.GetStatisticsRequest) *internalpb.GetStatisticsResponse); ok {
r0 = rf(ctx, req)
} else {
@ -75,7 +84,6 @@ func (_m *MockWorker) GetStatistics(ctx context.Context, req *querypb.GetStatist
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.GetStatisticsRequest) error); ok {
r1 = rf(ctx, req)
} else {
@ -91,8 +99,8 @@ type MockWorker_GetStatistics_Call struct {
}
// GetStatistics is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.GetStatisticsRequest
// - ctx context.Context
// - req *querypb.GetStatisticsRequest
func (_e *MockWorker_Expecter) GetStatistics(ctx interface{}, req interface{}) *MockWorker_GetStatistics_Call {
return &MockWorker_GetStatistics_Call{Call: _e.mock.On("GetStatistics", ctx, req)}
}
@ -109,6 +117,11 @@ func (_c *MockWorker_GetStatistics_Call) Return(_a0 *internalpb.GetStatisticsRes
return _c
}
func (_c *MockWorker_GetStatistics_Call) RunAndReturn(run func(context.Context, *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)) *MockWorker_GetStatistics_Call {
_c.Call.Return(run)
return _c
}
// IsHealthy provides a mock function with given fields:
func (_m *MockWorker) IsHealthy() bool {
ret := _m.Called()
@ -145,6 +158,11 @@ func (_c *MockWorker_IsHealthy_Call) Return(_a0 bool) *MockWorker_IsHealthy_Call
return _c
}
func (_c *MockWorker_IsHealthy_Call) RunAndReturn(run func() bool) *MockWorker_IsHealthy_Call {
_c.Call.Return(run)
return _c
}
// LoadSegments provides a mock function with given fields: _a0, _a1
func (_m *MockWorker) LoadSegments(_a0 context.Context, _a1 *querypb.LoadSegmentsRequest) error {
ret := _m.Called(_a0, _a1)
@ -165,8 +183,8 @@ type MockWorker_LoadSegments_Call struct {
}
// LoadSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.LoadSegmentsRequest
// - _a0 context.Context
// - _a1 *querypb.LoadSegmentsRequest
func (_e *MockWorker_Expecter) LoadSegments(_a0 interface{}, _a1 interface{}) *MockWorker_LoadSegments_Call {
return &MockWorker_LoadSegments_Call{Call: _e.mock.On("LoadSegments", _a0, _a1)}
}
@ -183,11 +201,20 @@ func (_c *MockWorker_LoadSegments_Call) Return(_a0 error) *MockWorker_LoadSegmen
return _c
}
func (_c *MockWorker_LoadSegments_Call) RunAndReturn(run func(context.Context, *querypb.LoadSegmentsRequest) error) *MockWorker_LoadSegments_Call {
_c.Call.Return(run)
return _c
}
// QuerySegments provides a mock function with given fields: ctx, req
func (_m *MockWorker) QuerySegments(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error) {
ret := _m.Called(ctx, req)
var r0 *internalpb.RetrieveResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)); ok {
return rf(ctx, req)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.QueryRequest) *internalpb.RetrieveResults); ok {
r0 = rf(ctx, req)
} else {
@ -196,7 +223,6 @@ func (_m *MockWorker) QuerySegments(ctx context.Context, req *querypb.QueryReque
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.QueryRequest) error); ok {
r1 = rf(ctx, req)
} else {
@ -212,8 +238,8 @@ type MockWorker_QuerySegments_Call struct {
}
// QuerySegments is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.QueryRequest
// - ctx context.Context
// - req *querypb.QueryRequest
func (_e *MockWorker_Expecter) QuerySegments(ctx interface{}, req interface{}) *MockWorker_QuerySegments_Call {
return &MockWorker_QuerySegments_Call{Call: _e.mock.On("QuerySegments", ctx, req)}
}
@ -230,6 +256,11 @@ func (_c *MockWorker_QuerySegments_Call) Return(_a0 *internalpb.RetrieveResults,
return _c
}
func (_c *MockWorker_QuerySegments_Call) RunAndReturn(run func(context.Context, *querypb.QueryRequest) (*internalpb.RetrieveResults, error)) *MockWorker_QuerySegments_Call {
_c.Call.Return(run)
return _c
}
// ReleaseSegments provides a mock function with given fields: _a0, _a1
func (_m *MockWorker) ReleaseSegments(_a0 context.Context, _a1 *querypb.ReleaseSegmentsRequest) error {
ret := _m.Called(_a0, _a1)
@ -250,8 +281,8 @@ type MockWorker_ReleaseSegments_Call struct {
}
// ReleaseSegments is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *querypb.ReleaseSegmentsRequest
// - _a0 context.Context
// - _a1 *querypb.ReleaseSegmentsRequest
func (_e *MockWorker_Expecter) ReleaseSegments(_a0 interface{}, _a1 interface{}) *MockWorker_ReleaseSegments_Call {
return &MockWorker_ReleaseSegments_Call{Call: _e.mock.On("ReleaseSegments", _a0, _a1)}
}
@ -268,11 +299,20 @@ func (_c *MockWorker_ReleaseSegments_Call) Return(_a0 error) *MockWorker_Release
return _c
}
func (_c *MockWorker_ReleaseSegments_Call) RunAndReturn(run func(context.Context, *querypb.ReleaseSegmentsRequest) error) *MockWorker_ReleaseSegments_Call {
_c.Call.Return(run)
return _c
}
// SearchSegments provides a mock function with given fields: ctx, req
func (_m *MockWorker) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error) {
ret := _m.Called(ctx, req)
var r0 *internalpb.SearchResults
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)); ok {
return rf(ctx, req)
}
if rf, ok := ret.Get(0).(func(context.Context, *querypb.SearchRequest) *internalpb.SearchResults); ok {
r0 = rf(ctx, req)
} else {
@ -281,7 +321,6 @@ func (_m *MockWorker) SearchSegments(ctx context.Context, req *querypb.SearchReq
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *querypb.SearchRequest) error); ok {
r1 = rf(ctx, req)
} else {
@ -297,8 +336,8 @@ type MockWorker_SearchSegments_Call struct {
}
// SearchSegments is a helper method to define mock.On call
// - ctx context.Context
// - req *querypb.SearchRequest
// - ctx context.Context
// - req *querypb.SearchRequest
func (_e *MockWorker_Expecter) SearchSegments(ctx interface{}, req interface{}) *MockWorker_SearchSegments_Call {
return &MockWorker_SearchSegments_Call{Call: _e.mock.On("SearchSegments", ctx, req)}
}
@ -315,6 +354,11 @@ func (_c *MockWorker_SearchSegments_Call) Return(_a0 *internalpb.SearchResults,
return _c
}
func (_c *MockWorker_SearchSegments_Call) RunAndReturn(run func(context.Context, *querypb.SearchRequest) (*internalpb.SearchResults, error)) *MockWorker_SearchSegments_Call {
_c.Call.Return(run)
return _c
}
// Stop provides a mock function with given fields:
func (_m *MockWorker) Stop() {
_m.Called()
@ -342,13 +386,17 @@ func (_c *MockWorker_Stop_Call) Return() *MockWorker_Stop_Call {
return _c
}
type mockConstructorTestingTNewMockWorker interface {
mock.TestingT
Cleanup(func())
func (_c *MockWorker_Stop_Call) RunAndReturn(run func()) *MockWorker_Stop_Call {
_c.Call.Return(run)
return _c
}
// NewMockWorker creates a new instance of MockWorker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockWorker(t mockConstructorTestingTNewMockWorker) *MockWorker {
// The first argument is typically a *testing.T value.
func NewMockWorker(t interface {
mock.TestingT
Cleanup(func())
}) *MockWorker {
mock := &MockWorker{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.21.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package delegator
@ -755,13 +755,12 @@ func (_c *MockShardDelegator_Version_Call) RunAndReturn(run func() int64) *MockS
return _c
}
type mockConstructorTestingTNewMockShardDelegator interface {
// NewMockShardDelegator creates a new instance of MockShardDelegator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockShardDelegator(t interface {
mock.TestingT
Cleanup(func())
}
// NewMockShardDelegator creates a new instance of MockShardDelegator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockShardDelegator(t mockConstructorTestingTNewMockShardDelegator) *MockShardDelegator {
}) *MockShardDelegator {
mock := &MockShardDelegator{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.30.16. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package segments

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.21.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package segments
@ -261,13 +261,12 @@ func (_c *MockLoader_LoadIndex_Call) RunAndReturn(run func(context.Context, *Loc
return _c
}
type mockConstructorTestingTNewMockLoader interface {
// NewMockLoader creates a new instance of MockLoader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockLoader(t interface {
mock.TestingT
Cleanup(func())
}
// NewMockLoader creates a new instance of MockLoader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockLoader(t mockConstructorTestingTNewMockLoader) *MockLoader {
}) *MockLoader {
mock := &MockLoader{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mockrootcoord
@ -27,13 +27,16 @@ func (_m *GarbageCollector) GcCollectionData(ctx context.Context, coll *model.Co
ret := _m.Called(ctx, coll)
var r0 uint64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *model.Collection) (uint64, error)); ok {
return rf(ctx, coll)
}
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 {
@ -67,18 +70,26 @@ func (_c *GarbageCollector_GcCollectionData_Call) Return(ddlTs uint64, err error
return _c
}
func (_c *GarbageCollector_GcCollectionData_Call) RunAndReturn(run func(context.Context, *model.Collection) (uint64, error)) *GarbageCollector_GcCollectionData_Call {
_c.Call.Return(run)
return _c
}
// 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
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, []string, *model.Partition) (uint64, error)); ok {
return rf(ctx, pChannels, partition)
}
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 {
@ -113,6 +124,11 @@ func (_c *GarbageCollector_GcPartitionData_Call) Return(ddlTs uint64, err error)
return _c
}
func (_c *GarbageCollector_GcPartitionData_Call) RunAndReturn(run func(context.Context, []string, *model.Partition) (uint64, error)) *GarbageCollector_GcPartitionData_Call {
_c.Call.Return(run)
return _c
}
// ReDropCollection provides a mock function with given fields: collMeta, ts
func (_m *GarbageCollector) ReDropCollection(collMeta *model.Collection, ts uint64) {
_m.Called(collMeta, ts)
@ -142,6 +158,11 @@ func (_c *GarbageCollector_ReDropCollection_Call) Return() *GarbageCollector_ReD
return _c
}
func (_c *GarbageCollector_ReDropCollection_Call) RunAndReturn(run func(*model.Collection, uint64)) *GarbageCollector_ReDropCollection_Call {
_c.Call.Return(run)
return _c
}
// ReDropPartition provides a mock function with given fields: dbID, pChannels, partition, ts
func (_m *GarbageCollector) ReDropPartition(dbID int64, pChannels []string, partition *model.Partition, ts uint64) {
_m.Called(dbID, pChannels, partition, ts)
@ -173,6 +194,11 @@ func (_c *GarbageCollector_ReDropPartition_Call) Return() *GarbageCollector_ReDr
return _c
}
func (_c *GarbageCollector_ReDropPartition_Call) RunAndReturn(run func(int64, []string, *model.Partition, uint64)) *GarbageCollector_ReDropPartition_Call {
_c.Call.Return(run)
return _c
}
// RemoveCreatingCollection provides a mock function with given fields: collMeta
func (_m *GarbageCollector) RemoveCreatingCollection(collMeta *model.Collection) {
_m.Called(collMeta)
@ -201,6 +227,11 @@ func (_c *GarbageCollector_RemoveCreatingCollection_Call) Return() *GarbageColle
return _c
}
func (_c *GarbageCollector_RemoveCreatingCollection_Call) RunAndReturn(run func(*model.Collection)) *GarbageCollector_RemoveCreatingCollection_Call {
_c.Call.Return(run)
return _c
}
// RemoveCreatingPartition provides a mock function with given fields: dbID, partition, ts
func (_m *GarbageCollector) RemoveCreatingPartition(dbID int64, partition *model.Partition, ts uint64) {
_m.Called(dbID, partition, ts)
@ -231,13 +262,17 @@ func (_c *GarbageCollector_RemoveCreatingPartition_Call) Return() *GarbageCollec
return _c
}
type mockConstructorTestingTNewGarbageCollector interface {
mock.TestingT
Cleanup(func())
func (_c *GarbageCollector_RemoveCreatingPartition_Call) RunAndReturn(run func(int64, *model.Partition, uint64)) *GarbageCollector_RemoveCreatingPartition_Call {
_c.Call.Return(run)
return _c
}
// 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 {
// The first argument is typically a *testing.T value.
func NewGarbageCollector(t interface {
mock.TestingT
Cleanup(func())
}) *GarbageCollector {
mock := &GarbageCollector{}
mock.Mock.Test(t)

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
// Code generated by mockery v2.14.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package mocktso
import (
"time"
time "time"
"github.com/stretchr/testify/mock"
mock "github.com/stretchr/testify/mock"
)
// Allocator is an autogenerated mock type for the Allocator type
@ -13,18 +13,29 @@ type Allocator struct {
mock.Mock
}
type Allocator_Expecter struct {
mock *mock.Mock
}
func (_m *Allocator) EXPECT() *Allocator_Expecter {
return &Allocator_Expecter{mock: &_m.Mock}
}
// GenerateTSO provides a mock function with given fields: count
func (_m *Allocator) GenerateTSO(count uint32) (uint64, error) {
ret := _m.Called(count)
var r0 uint64
var r1 error
if rf, ok := ret.Get(0).(func(uint32) (uint64, error)); ok {
return rf(count)
}
if rf, ok := ret.Get(0).(func(uint32) uint64); ok {
r0 = rf(count)
} else {
r0 = ret.Get(0).(uint64)
}
var r1 error
if rf, ok := ret.Get(1).(func(uint32) error); ok {
r1 = rf(count)
} else {
@ -34,6 +45,34 @@ func (_m *Allocator) GenerateTSO(count uint32) (uint64, error) {
return r0, r1
}
// Allocator_GenerateTSO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateTSO'
type Allocator_GenerateTSO_Call struct {
*mock.Call
}
// GenerateTSO is a helper method to define mock.On call
// - count uint32
func (_e *Allocator_Expecter) GenerateTSO(count interface{}) *Allocator_GenerateTSO_Call {
return &Allocator_GenerateTSO_Call{Call: _e.mock.On("GenerateTSO", count)}
}
func (_c *Allocator_GenerateTSO_Call) Run(run func(count uint32)) *Allocator_GenerateTSO_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(uint32))
})
return _c
}
func (_c *Allocator_GenerateTSO_Call) Return(_a0 uint64, _a1 error) *Allocator_GenerateTSO_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *Allocator_GenerateTSO_Call) RunAndReturn(run func(uint32) (uint64, error)) *Allocator_GenerateTSO_Call {
_c.Call.Return(run)
return _c
}
// GetLastSavedTime provides a mock function with given fields:
func (_m *Allocator) GetLastSavedTime() time.Time {
ret := _m.Called()
@ -48,6 +87,33 @@ func (_m *Allocator) GetLastSavedTime() time.Time {
return r0
}
// Allocator_GetLastSavedTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastSavedTime'
type Allocator_GetLastSavedTime_Call struct {
*mock.Call
}
// GetLastSavedTime is a helper method to define mock.On call
func (_e *Allocator_Expecter) GetLastSavedTime() *Allocator_GetLastSavedTime_Call {
return &Allocator_GetLastSavedTime_Call{Call: _e.mock.On("GetLastSavedTime")}
}
func (_c *Allocator_GetLastSavedTime_Call) Run(run func()) *Allocator_GetLastSavedTime_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Allocator_GetLastSavedTime_Call) Return(_a0 time.Time) *Allocator_GetLastSavedTime_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Allocator_GetLastSavedTime_Call) RunAndReturn(run func() time.Time) *Allocator_GetLastSavedTime_Call {
_c.Call.Return(run)
return _c
}
// Initialize provides a mock function with given fields:
func (_m *Allocator) Initialize() error {
ret := _m.Called()
@ -62,11 +128,65 @@ func (_m *Allocator) Initialize() error {
return r0
}
// Allocator_Initialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Initialize'
type Allocator_Initialize_Call struct {
*mock.Call
}
// Initialize is a helper method to define mock.On call
func (_e *Allocator_Expecter) Initialize() *Allocator_Initialize_Call {
return &Allocator_Initialize_Call{Call: _e.mock.On("Initialize")}
}
func (_c *Allocator_Initialize_Call) Run(run func()) *Allocator_Initialize_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Allocator_Initialize_Call) Return(_a0 error) *Allocator_Initialize_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Allocator_Initialize_Call) RunAndReturn(run func() error) *Allocator_Initialize_Call {
_c.Call.Return(run)
return _c
}
// Reset provides a mock function with given fields:
func (_m *Allocator) Reset() {
_m.Called()
}
// Allocator_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset'
type Allocator_Reset_Call struct {
*mock.Call
}
// Reset is a helper method to define mock.On call
func (_e *Allocator_Expecter) Reset() *Allocator_Reset_Call {
return &Allocator_Reset_Call{Call: _e.mock.On("Reset")}
}
func (_c *Allocator_Reset_Call) Run(run func()) *Allocator_Reset_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Allocator_Reset_Call) Return() *Allocator_Reset_Call {
_c.Call.Return()
return _c
}
func (_c *Allocator_Reset_Call) RunAndReturn(run func()) *Allocator_Reset_Call {
_c.Call.Return(run)
return _c
}
// SetTSO provides a mock function with given fields: _a0
func (_m *Allocator) SetTSO(_a0 uint64) error {
ret := _m.Called(_a0)
@ -81,6 +201,34 @@ func (_m *Allocator) SetTSO(_a0 uint64) error {
return r0
}
// Allocator_SetTSO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTSO'
type Allocator_SetTSO_Call struct {
*mock.Call
}
// SetTSO is a helper method to define mock.On call
// - _a0 uint64
func (_e *Allocator_Expecter) SetTSO(_a0 interface{}) *Allocator_SetTSO_Call {
return &Allocator_SetTSO_Call{Call: _e.mock.On("SetTSO", _a0)}
}
func (_c *Allocator_SetTSO_Call) Run(run func(_a0 uint64)) *Allocator_SetTSO_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(uint64))
})
return _c
}
func (_c *Allocator_SetTSO_Call) Return(_a0 error) *Allocator_SetTSO_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Allocator_SetTSO_Call) RunAndReturn(run func(uint64) error) *Allocator_SetTSO_Call {
_c.Call.Return(run)
return _c
}
// UpdateTSO provides a mock function with given fields:
func (_m *Allocator) UpdateTSO() error {
ret := _m.Called()
@ -95,13 +243,39 @@ func (_m *Allocator) UpdateTSO() error {
return r0
}
type mockConstructorTestingTNewAllocator interface {
mock.TestingT
Cleanup(func())
// Allocator_UpdateTSO_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTSO'
type Allocator_UpdateTSO_Call struct {
*mock.Call
}
// UpdateTSO is a helper method to define mock.On call
func (_e *Allocator_Expecter) UpdateTSO() *Allocator_UpdateTSO_Call {
return &Allocator_UpdateTSO_Call{Call: _e.mock.On("UpdateTSO")}
}
func (_c *Allocator_UpdateTSO_Call) Run(run func()) *Allocator_UpdateTSO_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *Allocator_UpdateTSO_Call) Return(_a0 error) *Allocator_UpdateTSO_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *Allocator_UpdateTSO_Call) RunAndReturn(run func() error) *Allocator_UpdateTSO_Call {
_c.Call.Return(run)
return _c
}
// NewAllocator creates a new instance of Allocator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAllocator(t mockConstructorTestingTNewAllocator) *Allocator {
// The first argument is typically a *testing.T value.
func NewAllocator(t interface {
mock.TestingT
Cleanup(func())
}) *Allocator {
mock := &Allocator{}
mock.Mock.Test(t)

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.15.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package dependency
@ -54,11 +54,20 @@ func (_c *MockFactory_Init_Call) Return() *MockFactory_Init_Call {
return _c
}
func (_c *MockFactory_Init_Call) RunAndReturn(run func(*paramtable.ComponentParam)) *MockFactory_Init_Call {
_c.Call.Return(run)
return _c
}
// NewMsgStream provides a mock function with given fields: ctx
func (_m *MockFactory) NewMsgStream(ctx context.Context) (msgstream.MsgStream, error) {
ret := _m.Called(ctx)
var r0 msgstream.MsgStream
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (msgstream.MsgStream, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) msgstream.MsgStream); ok {
r0 = rf(ctx)
} else {
@ -67,7 +76,6 @@ func (_m *MockFactory) NewMsgStream(ctx context.Context) (msgstream.MsgStream, e
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
@ -100,6 +108,11 @@ func (_c *MockFactory_NewMsgStream_Call) Return(_a0 msgstream.MsgStream, _a1 err
return _c
}
func (_c *MockFactory_NewMsgStream_Call) RunAndReturn(run func(context.Context) (msgstream.MsgStream, error)) *MockFactory_NewMsgStream_Call {
_c.Call.Return(run)
return _c
}
// NewMsgStreamDisposer provides a mock function with given fields: ctx
func (_m *MockFactory) NewMsgStreamDisposer(ctx context.Context) func([]string, string) error {
ret := _m.Called(ctx)
@ -139,11 +152,20 @@ func (_c *MockFactory_NewMsgStreamDisposer_Call) Return(_a0 func([]string, strin
return _c
}
func (_c *MockFactory_NewMsgStreamDisposer_Call) RunAndReturn(run func(context.Context) func([]string, string) error) *MockFactory_NewMsgStreamDisposer_Call {
_c.Call.Return(run)
return _c
}
// NewPersistentStorageChunkManager provides a mock function with given fields: ctx
func (_m *MockFactory) NewPersistentStorageChunkManager(ctx context.Context) (storage.ChunkManager, error) {
ret := _m.Called(ctx)
var r0 storage.ChunkManager
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (storage.ChunkManager, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) storage.ChunkManager); ok {
r0 = rf(ctx)
} else {
@ -152,7 +174,6 @@ func (_m *MockFactory) NewPersistentStorageChunkManager(ctx context.Context) (st
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
@ -185,49 +206,8 @@ func (_c *MockFactory_NewPersistentStorageChunkManager_Call) Return(_a0 storage.
return _c
}
// NewQueryMsgStream provides a mock function with given fields: ctx
func (_m *MockFactory) NewQueryMsgStream(ctx context.Context) (msgstream.MsgStream, error) {
ret := _m.Called(ctx)
var r0 msgstream.MsgStream
if rf, ok := ret.Get(0).(func(context.Context) msgstream.MsgStream); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(msgstream.MsgStream)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockFactory_NewQueryMsgStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewQueryMsgStream'
type MockFactory_NewQueryMsgStream_Call struct {
*mock.Call
}
// NewQueryMsgStream is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockFactory_Expecter) NewQueryMsgStream(ctx interface{}) *MockFactory_NewQueryMsgStream_Call {
return &MockFactory_NewQueryMsgStream_Call{Call: _e.mock.On("NewQueryMsgStream", ctx)}
}
func (_c *MockFactory_NewQueryMsgStream_Call) Run(run func(ctx context.Context)) *MockFactory_NewQueryMsgStream_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockFactory_NewQueryMsgStream_Call) Return(_a0 msgstream.MsgStream, _a1 error) *MockFactory_NewQueryMsgStream_Call {
_c.Call.Return(_a0, _a1)
func (_c *MockFactory_NewPersistentStorageChunkManager_Call) RunAndReturn(run func(context.Context) (storage.ChunkManager, error)) *MockFactory_NewPersistentStorageChunkManager_Call {
_c.Call.Return(run)
return _c
}
@ -236,6 +216,10 @@ func (_m *MockFactory) NewTtMsgStream(ctx context.Context) (msgstream.MsgStream,
ret := _m.Called(ctx)
var r0 msgstream.MsgStream
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (msgstream.MsgStream, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) msgstream.MsgStream); ok {
r0 = rf(ctx)
} else {
@ -244,7 +228,6 @@ func (_m *MockFactory) NewTtMsgStream(ctx context.Context) (msgstream.MsgStream,
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
@ -277,13 +260,17 @@ func (_c *MockFactory_NewTtMsgStream_Call) Return(_a0 msgstream.MsgStream, _a1 e
return _c
}
type mockConstructorTestingTNewMockFactory interface {
mock.TestingT
Cleanup(func())
func (_c *MockFactory_NewTtMsgStream_Call) RunAndReturn(run func(context.Context) (msgstream.MsgStream, error)) *MockFactory_NewTtMsgStream_Call {
_c.Call.Return(run)
return _c
}
// NewMockFactory creates a new instance of MockFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockFactory(t mockConstructorTestingTNewMockFactory) *MockFactory {
// The first argument is typically a *testing.T value.
func NewMockFactory(t interface {
mock.TestingT
Cleanup(func())
}) *MockFactory {
mock := &MockFactory{}
mock.Mock.Test(t)

18
pkg/Makefile Normal file
View File

@ -0,0 +1,18 @@
GO ?= go
PWD := $(shell pwd)
GOPATH := $(shell $(GO) env GOPATH)
ROOTPATH := $(abspath $(dir $(PWD)))
SHELL := /bin/bash
OBJPREFIX := "github.com/milvus-io/milvus/cmd/milvus"
INSTALL_PATH := $(ROOTPATH)/bin
# use parent getdeps
getdeps:
$(MAKE) -C $(ROOTPATH) getdeps
generate-mockery: getdeps
$(INSTALL_PATH)/mockery --name=MsgStream --dir=$(PWD)/mq/msgstream --output=$(PWD)/mq/msgstream --filename=mock_msgstream.go --with-expecter --structname=MockMsgStream --outpkg=msgstream --inpackage
$(INSTALL_PATH)/mockery --name=Client --dir=$(PWD)/mq/msgdispatcher --output=$(PWD)/mq/msgsdispatcher --filename=mock_client.go --with-expecter --structname=MockClient --outpkg=msgdispatcher --inpackage
$(INSTALL_PATH)/mockery --name=Logger --dir=$(PWD)/eventlog --output=$(PWD)/eventlog --filename=mock_logger.go --with-expecter --structname=MockLogger --outpkg=eventlog --inpackage

View File

@ -1,4 +1,4 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package eventlog
@ -53,6 +53,11 @@ func (_c *MockLogger_Flush_Call) Return(_a0 error) *MockLogger_Flush_Call {
return _c
}
func (_c *MockLogger_Flush_Call) RunAndReturn(run func() error) *MockLogger_Flush_Call {
_c.Call.Return(run)
return _c
}
// Record provides a mock function with given fields: _a0
func (_m *MockLogger) Record(_a0 Evt) {
_m.Called(_a0)
@ -64,7 +69,7 @@ type MockLogger_Record_Call struct {
}
// Record is a helper method to define mock.On call
// - _a0 Evt
// - _a0 Evt
func (_e *MockLogger_Expecter) Record(_a0 interface{}) *MockLogger_Record_Call {
return &MockLogger_Record_Call{Call: _e.mock.On("Record", _a0)}
}
@ -81,6 +86,11 @@ func (_c *MockLogger_Record_Call) Return() *MockLogger_Record_Call {
return _c
}
func (_c *MockLogger_Record_Call) RunAndReturn(run func(Evt)) *MockLogger_Record_Call {
_c.Call.Return(run)
return _c
}
// RecordFunc provides a mock function with given fields: _a0, _a1
func (_m *MockLogger) RecordFunc(_a0 Level, _a1 func() Evt) {
_m.Called(_a0, _a1)
@ -92,8 +102,8 @@ type MockLogger_RecordFunc_Call struct {
}
// RecordFunc is a helper method to define mock.On call
// - _a0 Level
// - _a1 func() Evt
// - _a0 Level
// - _a1 func() Evt
func (_e *MockLogger_Expecter) RecordFunc(_a0 interface{}, _a1 interface{}) *MockLogger_RecordFunc_Call {
return &MockLogger_RecordFunc_Call{Call: _e.mock.On("RecordFunc", _a0, _a1)}
}
@ -110,13 +120,17 @@ func (_c *MockLogger_RecordFunc_Call) Return() *MockLogger_RecordFunc_Call {
return _c
}
type mockConstructorTestingTNewMockLogger interface {
mock.TestingT
Cleanup(func())
func (_c *MockLogger_RecordFunc_Call) RunAndReturn(run func(Level, func() Evt)) *MockLogger_RecordFunc_Call {
_c.Call.Return(run)
return _c
}
// NewMockLogger creates a new instance of MockLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockLogger(t mockConstructorTestingTNewMockLogger) *MockLogger {
// The first argument is typically a *testing.T value.
func NewMockLogger(t interface {
mock.TestingT
Cleanup(func())
}) *MockLogger {
mock := &MockLogger{}
mock.Mock.Test(t)

View File

@ -1,13 +1,12 @@
// Code generated by mockery v2.16.0. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package msgdispatcher
import (
msgpb "github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
mqwrapper "github.com/milvus-io/milvus/pkg/mq/msgstream/mqwrapper"
mock "github.com/stretchr/testify/mock"
msgpb "github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
msgstream "github.com/milvus-io/milvus/pkg/mq/msgstream"
)
@ -51,6 +50,11 @@ func (_c *MockClient_Close_Call) Return() *MockClient_Close_Call {
return _c
}
func (_c *MockClient_Close_Call) RunAndReturn(run func()) *MockClient_Close_Call {
_c.Call.Return(run)
return _c
}
// Deregister provides a mock function with given fields: vchannel
func (_m *MockClient) Deregister(vchannel string) {
_m.Called(vchannel)
@ -62,7 +66,7 @@ type MockClient_Deregister_Call struct {
}
// Deregister is a helper method to define mock.On call
// - vchannel string
// - vchannel string
func (_e *MockClient_Expecter) Deregister(vchannel interface{}) *MockClient_Deregister_Call {
return &MockClient_Deregister_Call{Call: _e.mock.On("Deregister", vchannel)}
}
@ -79,11 +83,20 @@ func (_c *MockClient_Deregister_Call) Return() *MockClient_Deregister_Call {
return _c
}
func (_c *MockClient_Deregister_Call) RunAndReturn(run func(string)) *MockClient_Deregister_Call {
_c.Call.Return(run)
return _c
}
// Register provides a mock function with given fields: vchannel, pos, subPos
func (_m *MockClient) Register(vchannel string, pos *msgpb.MsgPosition, subPos mqwrapper.SubscriptionInitialPosition) (<-chan *msgstream.MsgPack, error) {
ret := _m.Called(vchannel, pos, subPos)
var r0 <-chan *msgstream.MsgPack
var r1 error
if rf, ok := ret.Get(0).(func(string, *msgpb.MsgPosition, mqwrapper.SubscriptionInitialPosition) (<-chan *msgstream.MsgPack, error)); ok {
return rf(vchannel, pos, subPos)
}
if rf, ok := ret.Get(0).(func(string, *msgpb.MsgPosition, mqwrapper.SubscriptionInitialPosition) <-chan *msgstream.MsgPack); ok {
r0 = rf(vchannel, pos, subPos)
} else {
@ -92,7 +105,6 @@ func (_m *MockClient) Register(vchannel string, pos *msgpb.MsgPosition, subPos m
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, *msgpb.MsgPosition, mqwrapper.SubscriptionInitialPosition) error); ok {
r1 = rf(vchannel, pos, subPos)
} else {
@ -108,9 +120,9 @@ type MockClient_Register_Call struct {
}
// Register is a helper method to define mock.On call
// - vchannel string
// - pos *msgpb.MsgPosition
// - subPos mqwrapper.SubscriptionInitialPosition
// - vchannel string
// - pos *msgpb.MsgPosition
// - subPos mqwrapper.SubscriptionInitialPosition
func (_e *MockClient_Expecter) Register(vchannel interface{}, pos interface{}, subPos interface{}) *MockClient_Register_Call {
return &MockClient_Register_Call{Call: _e.mock.On("Register", vchannel, pos, subPos)}
}
@ -127,13 +139,17 @@ func (_c *MockClient_Register_Call) Return(_a0 <-chan *msgstream.MsgPack, _a1 er
return _c
}
type mockConstructorTestingTNewMockClient interface {
mock.TestingT
Cleanup(func())
func (_c *MockClient_Register_Call) RunAndReturn(run func(string, *msgpb.MsgPosition, mqwrapper.SubscriptionInitialPosition) (<-chan *msgstream.MsgPack, error)) *MockClient_Register_Call {
_c.Call.Return(run)
return _c
}
// NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockClient(t mockConstructorTestingTNewMockClient) *MockClient {
// The first argument is typically a *testing.T value.
func NewMockClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockClient {
mock := &MockClient{}
mock.Mock.Test(t)

View File

@ -1,12 +1,11 @@
// Code generated by mockery v2.23.1. DO NOT EDIT.
// Code generated by mockery v2.32.4. DO NOT EDIT.
package msgstream
import (
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
mock "github.com/stretchr/testify/mock"
msgpb "github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
mqwrapper "github.com/milvus-io/milvus/pkg/mq/msgstream/mqwrapper"
mock "github.com/stretchr/testify/mock"
)
// MockMsgStream is an autogenerated mock type for the MsgStream type
@ -475,13 +474,12 @@ func (_c *MockMsgStream_SetRepackFunc_Call) RunAndReturn(run func(RepackFunc)) *
return _c
}
type mockConstructorTestingTNewMockMsgStream interface {
// NewMockMsgStream creates a new instance of MockMsgStream. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockMsgStream(t interface {
mock.TestingT
Cleanup(func())
}
// NewMockMsgStream creates a new instance of MockMsgStream. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockMsgStream(t mockConstructorTestingTNewMockMsgStream) *MockMsgStream {
}) *MockMsgStream {
mock := &MockMsgStream{}
mock.Mock.Test(t)