diff --git a/Makefile b/Makefile index bb5f615ec6..682cf34976 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ get-build-deps: getdeps: @mkdir -p ${GOPATH}/bin @which golangci-lint 1>/dev/null || (echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.46.2) + @$(PWD)/bin/mockery --version 2>&1 1>/dev/null || (echo "Installing mockery v2.16.0 to ./bin/" && GOBIN=$(PWD)/bin/ go install github.com/vektra/mockery/v2@v2.16.0) tools/bin/revive: tools/check/go.mod cd tools/check; \ @@ -303,5 +304,18 @@ mock-datacoord: mock-tnx-kv: mockery --name=TxnKV --dir=$(PWD)/internal/kv --output=$(PWD)/internal/kv/mocks --filename=TxnKV.go --with-expecter +generate-mockery: getdeps + # 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 + # internal/querynode + $(PWD)/bin/mockery --name=TSafeReplicaInterface --dir=$(PWD)/internal/querynode --output=$(PWD)/internal/querynode --filename=mock_tsafe_replica_test.go --with-expecter --structname=MockTSafeReplicaInterface --outpkg=querynode --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 ci-ut: build-cpp-with-coverage generated-proto-go-without-cpp codecov-cpp codecov-go diff --git a/internal/querycoordv2/balance/mock_balancer.go b/internal/querycoordv2/balance/mock_balancer.go index e78a3a0f89..552345f0fe 100644 --- a/internal/querycoordv2/balance/mock_balancer.go +++ b/internal/querycoordv2/balance/mock_balancer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.16.0. DO NOT EDIT. package balance diff --git a/internal/querycoordv2/meta/mock_broker.go b/internal/querycoordv2/meta/mock_broker.go index 534d1623b9..3d5bb2d036 100644 --- a/internal/querycoordv2/meta/mock_broker.go +++ b/internal/querycoordv2/meta/mock_broker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.16.0. DO NOT EDIT. package meta @@ -6,6 +6,7 @@ import ( context "context" datapb "github.com/milvus-io/milvus/internal/proto/datapb" + mock "github.com/stretchr/testify/mock" querypb "github.com/milvus-io/milvus/internal/proto/querypb" diff --git a/internal/querycoordv2/meta/mock_store.go b/internal/querycoordv2/meta/mock_store.go index d57e1dca30..7dd9632897 100644 --- a/internal/querycoordv2/meta/mock_store.go +++ b/internal/querycoordv2/meta/mock_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.16.0. DO NOT EDIT. package meta diff --git a/internal/querycoordv2/mocks/mock_querynode.go b/internal/querycoordv2/mocks/mock_querynode.go index de10646bbd..cad51f3b1d 100644 --- a/internal/querycoordv2/mocks/mock_querynode.go +++ b/internal/querycoordv2/mocks/mock_querynode.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.16.0. DO NOT EDIT. package mocks @@ -59,7 +59,7 @@ type MockQueryNodeServer_GetComponentStates_Call struct { // GetComponentStates is a helper method to define mock.On call // - _a0 context.Context -// - _a1 *internalpb.GetComponentStatesRequest +// - _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)} } diff --git a/internal/querycoordv2/session/mock_cluster.go b/internal/querycoordv2/session/mock_cluster.go index 812da45317..f9d3ed1aad 100644 --- a/internal/querycoordv2/session/mock_cluster.go +++ b/internal/querycoordv2/session/mock_cluster.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.16.0. DO NOT EDIT. package session diff --git a/internal/querycoordv2/task/mock_scheduler.go b/internal/querycoordv2/task/mock_scheduler.go index 83773b8c55..ae70e7b551 100644 --- a/internal/querycoordv2/task/mock_scheduler.go +++ b/internal/querycoordv2/task/mock_scheduler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.1. DO NOT EDIT. +// Code generated by mockery v2.16.0. DO NOT EDIT. package task diff --git a/internal/querynode/mock_tsafe_replica_test.go b/internal/querynode/mock_tsafe_replica_test.go index 64c2e70737..2658167a84 100644 --- a/internal/querynode/mock_tsafe_replica_test.go +++ b/internal/querynode/mock_tsafe_replica_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. +// Code generated by mockery v2.16.0. DO NOT EDIT. package querynode diff --git a/internal/rootcoord/mocks/GarbageCollector.go b/internal/rootcoord/mocks/GarbageCollector.go deleted file mode 100644 index e5c32c3cc6..0000000000 --- a/internal/rootcoord/mocks/GarbageCollector.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. - -package mockrootcoord - -import ( - context "context" - - model "github.com/milvus-io/milvus/internal/metastore/model" - mock "github.com/stretchr/testify/mock" -) - -// GarbageCollector is an autogenerated mock type for the GarbageCollector type -type GarbageCollector struct { - mock.Mock -} - -// GcCollectionData provides a mock function with given fields: ctx, coll -func (_m *GarbageCollector) GcCollectionData(ctx context.Context, coll *model.Collection) (uint64, error) { - ret := _m.Called(ctx, coll) - - var r0 uint64 - if rf, ok := ret.Get(0).(func(context.Context, *model.Collection) uint64); ok { - r0 = rf(ctx, coll) - } else { - r0 = ret.Get(0).(uint64) - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *model.Collection) error); ok { - r1 = rf(ctx, coll) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GcPartitionData provides a mock function with given fields: ctx, pChannels, partition -func (_m *GarbageCollector) GcPartitionData(ctx context.Context, pChannels []string, partition *model.Partition) (uint64, error) { - ret := _m.Called(ctx, pChannels, partition) - - var r0 uint64 - if rf, ok := ret.Get(0).(func(context.Context, []string, *model.Partition) uint64); ok { - r0 = rf(ctx, pChannels, partition) - } else { - r0 = ret.Get(0).(uint64) - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, []string, *model.Partition) error); ok { - r1 = rf(ctx, pChannels, partition) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReDropCollection provides a mock function with given fields: collMeta, ts -func (_m *GarbageCollector) ReDropCollection(collMeta *model.Collection, ts uint64) { - _m.Called(collMeta, ts) -} - -// ReDropPartition provides a mock function with given fields: pChannels, partition, ts -func (_m *GarbageCollector) ReDropPartition(pChannels []string, partition *model.Partition, ts uint64) { - _m.Called(pChannels, partition, ts) -} - -// RemoveCreatingCollection provides a mock function with given fields: collMeta -func (_m *GarbageCollector) RemoveCreatingCollection(collMeta *model.Collection) { - _m.Called(collMeta) -} - -type mockConstructorTestingTNewGarbageCollector interface { - mock.TestingT - Cleanup(func()) -} - -// NewGarbageCollector creates a new instance of GarbageCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGarbageCollector(t mockConstructorTestingTNewGarbageCollector) *GarbageCollector { - mock := &GarbageCollector{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/rootcoord/mocks/IMetaTable.go b/internal/rootcoord/mocks/IMetaTable.go deleted file mode 100644 index 4ebf893e4c..0000000000 --- a/internal/rootcoord/mocks/IMetaTable.go +++ /dev/null @@ -1,645 +0,0 @@ -// Code generated by mockery v2.14.0. DO NOT EDIT. - -package mockrootcoord - -import ( - context "context" - - etcdpb "github.com/milvus-io/milvus/internal/proto/etcdpb" - internalpb "github.com/milvus-io/milvus/internal/proto/internalpb" - - milvuspb "github.com/milvus-io/milvus-proto/go-api/milvuspb" - - mock "github.com/stretchr/testify/mock" - - model "github.com/milvus-io/milvus/internal/metastore/model" -) - -// IMetaTable is an autogenerated mock type for the IMetaTable type -type IMetaTable struct { - mock.Mock -} - -// AddCollection provides a mock function with given fields: ctx, coll -func (_m *IMetaTable) AddCollection(ctx context.Context, coll *model.Collection) error { - ret := _m.Called(ctx, coll) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *model.Collection) error); ok { - r0 = rf(ctx, coll) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// AddCredential provides a mock function with given fields: credInfo -func (_m *IMetaTable) AddCredential(credInfo *internalpb.CredentialInfo) error { - ret := _m.Called(credInfo) - - var r0 error - if rf, ok := ret.Get(0).(func(*internalpb.CredentialInfo) error); ok { - r0 = rf(credInfo) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// AddPartition provides a mock function with given fields: ctx, partition -func (_m *IMetaTable) AddPartition(ctx context.Context, partition *model.Partition) error { - ret := _m.Called(ctx, partition) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *model.Partition) error); ok { - r0 = rf(ctx, partition) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// AlterAlias provides a mock function with given fields: ctx, alias, collectionName, ts -func (_m *IMetaTable) AlterAlias(ctx context.Context, alias string, collectionName string, ts uint64) error { - ret := _m.Called(ctx, alias, collectionName, ts) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) error); ok { - r0 = rf(ctx, alias, collectionName, ts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// AlterCollection provides a mock function with given fields: ctx, oldColl, newColl, ts -func (_m *IMetaTable) AlterCollection(ctx context.Context, oldColl *model.Collection, newColl *model.Collection, ts uint64) error { - ret := _m.Called(ctx, oldColl, newColl, ts) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *model.Collection, *model.Collection, uint64) error); ok { - r0 = rf(ctx, oldColl, newColl, ts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// AlterCredential provides a mock function with given fields: credInfo -func (_m *IMetaTable) AlterCredential(credInfo *internalpb.CredentialInfo) error { - ret := _m.Called(credInfo) - - var r0 error - if rf, ok := ret.Get(0).(func(*internalpb.CredentialInfo) error); ok { - r0 = rf(credInfo) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ChangeCollectionState provides a mock function with given fields: ctx, collectionID, state, ts -func (_m *IMetaTable) ChangeCollectionState(ctx context.Context, collectionID int64, state etcdpb.CollectionState, ts uint64) error { - ret := _m.Called(ctx, collectionID, state, ts) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64, etcdpb.CollectionState, uint64) error); ok { - r0 = rf(ctx, collectionID, state, ts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ChangePartitionState provides a mock function with given fields: ctx, collectionID, partitionID, state, ts -func (_m *IMetaTable) ChangePartitionState(ctx context.Context, collectionID int64, partitionID int64, state etcdpb.PartitionState, ts uint64) error { - ret := _m.Called(ctx, collectionID, partitionID, state, ts) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64, int64, etcdpb.PartitionState, uint64) error); ok { - r0 = rf(ctx, collectionID, partitionID, state, ts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// CreateAlias provides a mock function with given fields: ctx, alias, collectionName, ts -func (_m *IMetaTable) CreateAlias(ctx context.Context, alias string, collectionName string, ts uint64) error { - ret := _m.Called(ctx, alias, collectionName, ts) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) error); ok { - r0 = rf(ctx, alias, collectionName, ts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// CreateRole provides a mock function with given fields: tenant, entity -func (_m *IMetaTable) CreateRole(tenant string, entity *milvuspb.RoleEntity) error { - ret := _m.Called(tenant, entity) - - var r0 error - if rf, ok := ret.Get(0).(func(string, *milvuspb.RoleEntity) error); ok { - r0 = rf(tenant, entity) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DeleteCredential provides a mock function with given fields: username -func (_m *IMetaTable) DeleteCredential(username string) error { - ret := _m.Called(username) - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(username) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DropAlias provides a mock function with given fields: ctx, alias, ts -func (_m *IMetaTable) DropAlias(ctx context.Context, alias string, ts uint64) error { - ret := _m.Called(ctx, alias, ts) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, uint64) error); ok { - r0 = rf(ctx, alias, ts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DropGrant provides a mock function with given fields: tenant, role -func (_m *IMetaTable) DropGrant(tenant string, role *milvuspb.RoleEntity) error { - ret := _m.Called(tenant, role) - - var r0 error - if rf, ok := ret.Get(0).(func(string, *milvuspb.RoleEntity) error); ok { - r0 = rf(tenant, role) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DropRole provides a mock function with given fields: tenant, roleName -func (_m *IMetaTable) DropRole(tenant string, roleName string) error { - ret := _m.Called(tenant, roleName) - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(tenant, roleName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetCollectionByID provides a mock function with given fields: ctx, collectionID, ts, allowUnavailable -func (_m *IMetaTable) GetCollectionByID(ctx context.Context, collectionID int64, ts uint64, allowUnavailable bool) (*model.Collection, error) { - ret := _m.Called(ctx, collectionID, ts, allowUnavailable) - - var r0 *model.Collection - if rf, ok := ret.Get(0).(func(context.Context, int64, uint64, bool) *model.Collection); ok { - r0 = rf(ctx, collectionID, ts, allowUnavailable) - } 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, bool) error); ok { - r1 = rf(ctx, collectionID, ts, allowUnavailable) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetCollectionByName provides a mock function with given fields: ctx, collectionName, ts -func (_m *IMetaTable) GetCollectionByName(ctx context.Context, collectionName string, ts uint64) (*model.Collection, error) { - ret := _m.Called(ctx, collectionName, ts) - - var r0 *model.Collection - if rf, ok := ret.Get(0).(func(context.Context, string, uint64) *model.Collection); ok { - r0 = rf(ctx, 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, string, uint64) error); ok { - r1 = rf(ctx, collectionName, ts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetCollectionVirtualChannels provides a mock function with given fields: colID -func (_m *IMetaTable) GetCollectionVirtualChannels(colID int64) []string { - ret := _m.Called(colID) - - var r0 []string - if rf, ok := ret.Get(0).(func(int64) []string); ok { - r0 = rf(colID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - return r0 -} - -// GetCredential provides a mock function with given fields: username -func (_m *IMetaTable) GetCredential(username string) (*internalpb.CredentialInfo, error) { - ret := _m.Called(username) - - var r0 *internalpb.CredentialInfo - if rf, ok := ret.Get(0).(func(string) *internalpb.CredentialInfo); ok { - r0 = rf(username) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*internalpb.CredentialInfo) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(username) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPartitionByName provides a mock function with given fields: collID, partitionName, ts -func (_m *IMetaTable) GetPartitionByName(collID int64, partitionName string, ts uint64) (int64, error) { - ret := _m.Called(collID, partitionName, ts) - - var r0 int64 - if rf, ok := ret.Get(0).(func(int64, string, uint64) int64); ok { - r0 = rf(collID, partitionName, ts) - } else { - r0 = ret.Get(0).(int64) - } - - var r1 error - if rf, ok := ret.Get(1).(func(int64, string, uint64) error); ok { - r1 = rf(collID, partitionName, ts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPartitionNameByID provides a mock function with given fields: collID, partitionID, ts -func (_m *IMetaTable) GetPartitionNameByID(collID int64, partitionID int64, ts uint64) (string, error) { - ret := _m.Called(collID, partitionID, ts) - - var r0 string - if rf, ok := ret.Get(0).(func(int64, int64, uint64) string); ok { - r0 = rf(collID, partitionID, ts) - } else { - r0 = ret.Get(0).(string) - } - - var r1 error - if rf, ok := ret.Get(1).(func(int64, int64, uint64) error); ok { - r1 = rf(collID, partitionID, ts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// IsAlias provides a mock function with given fields: name -func (_m *IMetaTable) IsAlias(name string) bool { - ret := _m.Called(name) - - var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(name) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// ListAbnormalCollections provides a mock function with given fields: ctx, ts -func (_m *IMetaTable) ListAbnormalCollections(ctx context.Context, ts uint64) ([]*model.Collection, error) { - ret := _m.Called(ctx, ts) - - var r0 []*model.Collection - if rf, ok := ret.Get(0).(func(context.Context, uint64) []*model.Collection); ok { - r0 = rf(ctx, 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, uint64) error); ok { - r1 = rf(ctx, ts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListAliasesByID provides a mock function with given fields: collID -func (_m *IMetaTable) ListAliasesByID(collID int64) []string { - ret := _m.Called(collID) - - var r0 []string - if rf, ok := ret.Get(0).(func(int64) []string); ok { - r0 = rf(collID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - return r0 -} - -// ListCollectionPhysicalChannels provides a mock function with given fields: -func (_m *IMetaTable) ListCollectionPhysicalChannels() map[int64][]string { - ret := _m.Called() - - var r0 map[int64][]string - if rf, ok := ret.Get(0).(func() map[int64][]string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[int64][]string) - } - } - - return r0 -} - -// ListCollections provides a mock function with given fields: ctx, ts -func (_m *IMetaTable) ListCollections(ctx context.Context, ts uint64) ([]*model.Collection, error) { - ret := _m.Called(ctx, ts) - - var r0 []*model.Collection - if rf, ok := ret.Get(0).(func(context.Context, uint64) []*model.Collection); ok { - r0 = rf(ctx, 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, uint64) error); ok { - r1 = rf(ctx, ts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListCredentialUsernames provides a mock function with given fields: -func (_m *IMetaTable) ListCredentialUsernames() (*milvuspb.ListCredUsersResponse, error) { - ret := _m.Called() - - var r0 *milvuspb.ListCredUsersResponse - if rf, ok := ret.Get(0).(func() *milvuspb.ListCredUsersResponse); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*milvuspb.ListCredUsersResponse) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListPolicy provides a mock function with given fields: tenant -func (_m *IMetaTable) ListPolicy(tenant string) ([]string, error) { - ret := _m.Called(tenant) - - var r0 []string - if rf, ok := ret.Get(0).(func(string) []string); ok { - r0 = rf(tenant) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(tenant) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListUserRole provides a mock function with given fields: tenant -func (_m *IMetaTable) ListUserRole(tenant string) ([]string, error) { - ret := _m.Called(tenant) - - var r0 []string - if rf, ok := ret.Get(0).(func(string) []string); ok { - r0 = rf(tenant) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(tenant) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// OperatePrivilege provides a mock function with given fields: tenant, entity, operateType -func (_m *IMetaTable) OperatePrivilege(tenant string, entity *milvuspb.GrantEntity, operateType milvuspb.OperatePrivilegeType) error { - ret := _m.Called(tenant, entity, operateType) - - var r0 error - if rf, ok := ret.Get(0).(func(string, *milvuspb.GrantEntity, milvuspb.OperatePrivilegeType) error); ok { - r0 = rf(tenant, entity, operateType) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// OperateUserRole provides a mock function with given fields: tenant, userEntity, roleEntity, operateType -func (_m *IMetaTable) OperateUserRole(tenant string, userEntity *milvuspb.UserEntity, roleEntity *milvuspb.RoleEntity, operateType milvuspb.OperateUserRoleType) error { - ret := _m.Called(tenant, userEntity, roleEntity, operateType) - - var r0 error - if rf, ok := ret.Get(0).(func(string, *milvuspb.UserEntity, *milvuspb.RoleEntity, milvuspb.OperateUserRoleType) error); ok { - r0 = rf(tenant, userEntity, roleEntity, operateType) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// RemoveCollection provides a mock function with given fields: ctx, collectionID, ts -func (_m *IMetaTable) RemoveCollection(ctx context.Context, collectionID int64, ts uint64) error { - ret := _m.Called(ctx, collectionID, ts) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) error); ok { - r0 = rf(ctx, collectionID, ts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// RemovePartition provides a mock function with given fields: ctx, collectionID, partitionID, ts -func (_m *IMetaTable) RemovePartition(ctx context.Context, collectionID int64, partitionID int64, ts uint64) error { - ret := _m.Called(ctx, collectionID, partitionID, ts) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64, int64, uint64) error); ok { - r0 = rf(ctx, collectionID, partitionID, ts) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SelectGrant provides a mock function with given fields: tenant, entity -func (_m *IMetaTable) SelectGrant(tenant string, entity *milvuspb.GrantEntity) ([]*milvuspb.GrantEntity, error) { - ret := _m.Called(tenant, entity) - - var r0 []*milvuspb.GrantEntity - if rf, ok := ret.Get(0).(func(string, *milvuspb.GrantEntity) []*milvuspb.GrantEntity); ok { - r0 = rf(tenant, entity) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*milvuspb.GrantEntity) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(string, *milvuspb.GrantEntity) error); ok { - r1 = rf(tenant, entity) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SelectRole provides a mock function with given fields: tenant, entity, includeUserInfo -func (_m *IMetaTable) SelectRole(tenant string, entity *milvuspb.RoleEntity, includeUserInfo bool) ([]*milvuspb.RoleResult, error) { - ret := _m.Called(tenant, entity, includeUserInfo) - - var r0 []*milvuspb.RoleResult - if rf, ok := ret.Get(0).(func(string, *milvuspb.RoleEntity, bool) []*milvuspb.RoleResult); ok { - r0 = rf(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(string, *milvuspb.RoleEntity, bool) error); ok { - r1 = rf(tenant, entity, includeUserInfo) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SelectUser provides a mock function with given fields: tenant, entity, includeRoleInfo -func (_m *IMetaTable) SelectUser(tenant string, entity *milvuspb.UserEntity, includeRoleInfo bool) ([]*milvuspb.UserResult, error) { - ret := _m.Called(tenant, entity, includeRoleInfo) - - var r0 []*milvuspb.UserResult - if rf, ok := ret.Get(0).(func(string, *milvuspb.UserEntity, bool) []*milvuspb.UserResult); ok { - r0 = rf(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(string, *milvuspb.UserEntity, bool) error); ok { - r1 = rf(tenant, entity, includeRoleInfo) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type mockConstructorTestingTNewIMetaTable interface { - mock.TestingT - Cleanup(func()) -} - -// NewIMetaTable creates a new instance of IMetaTable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIMetaTable(t mockConstructorTestingTNewIMetaTable) *IMetaTable { - mock := &IMetaTable{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/rootcoord/mocks/garbage_collector.go b/internal/rootcoord/mocks/garbage_collector.go new file mode 100644 index 0000000000..3905b5a032 --- /dev/null +++ b/internal/rootcoord/mocks/garbage_collector.go @@ -0,0 +1,216 @@ +// Code generated by mockery v2.16.0. DO NOT EDIT. + +package mockrootcoord + +import ( + context "context" + + model "github.com/milvus-io/milvus/internal/metastore/model" + mock "github.com/stretchr/testify/mock" +) + +// GarbageCollector is an autogenerated mock type for the GarbageCollector type +type GarbageCollector struct { + mock.Mock +} + +type GarbageCollector_Expecter struct { + mock *mock.Mock +} + +func (_m *GarbageCollector) EXPECT() *GarbageCollector_Expecter { + return &GarbageCollector_Expecter{mock: &_m.Mock} +} + +// GcCollectionData provides a mock function with given fields: ctx, coll +func (_m *GarbageCollector) GcCollectionData(ctx context.Context, coll *model.Collection) (uint64, error) { + ret := _m.Called(ctx, coll) + + var r0 uint64 + if rf, ok := ret.Get(0).(func(context.Context, *model.Collection) uint64); ok { + r0 = rf(ctx, coll) + } else { + r0 = ret.Get(0).(uint64) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *model.Collection) error); ok { + r1 = rf(ctx, coll) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GarbageCollector_GcCollectionData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GcCollectionData' +type GarbageCollector_GcCollectionData_Call struct { + *mock.Call +} + +// GcCollectionData is a helper method to define mock.On call +// - ctx context.Context +// - coll *model.Collection +func (_e *GarbageCollector_Expecter) GcCollectionData(ctx interface{}, coll interface{}) *GarbageCollector_GcCollectionData_Call { + return &GarbageCollector_GcCollectionData_Call{Call: _e.mock.On("GcCollectionData", ctx, coll)} +} + +func (_c *GarbageCollector_GcCollectionData_Call) Run(run func(ctx context.Context, coll *model.Collection)) *GarbageCollector_GcCollectionData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*model.Collection)) + }) + return _c +} + +func (_c *GarbageCollector_GcCollectionData_Call) Return(ddlTs uint64, err error) *GarbageCollector_GcCollectionData_Call { + _c.Call.Return(ddlTs, err) + 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 + if rf, ok := ret.Get(0).(func(context.Context, []string, *model.Partition) uint64); ok { + r0 = rf(ctx, pChannels, partition) + } else { + r0 = ret.Get(0).(uint64) + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, []string, *model.Partition) error); ok { + r1 = rf(ctx, pChannels, partition) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GarbageCollector_GcPartitionData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GcPartitionData' +type GarbageCollector_GcPartitionData_Call struct { + *mock.Call +} + +// GcPartitionData is a helper method to define mock.On call +// - ctx context.Context +// - pChannels []string +// - partition *model.Partition +func (_e *GarbageCollector_Expecter) GcPartitionData(ctx interface{}, pChannels interface{}, partition interface{}) *GarbageCollector_GcPartitionData_Call { + return &GarbageCollector_GcPartitionData_Call{Call: _e.mock.On("GcPartitionData", ctx, pChannels, partition)} +} + +func (_c *GarbageCollector_GcPartitionData_Call) Run(run func(ctx context.Context, pChannels []string, partition *model.Partition)) *GarbageCollector_GcPartitionData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]string), args[2].(*model.Partition)) + }) + return _c +} + +func (_c *GarbageCollector_GcPartitionData_Call) Return(ddlTs uint64, err error) *GarbageCollector_GcPartitionData_Call { + _c.Call.Return(ddlTs, err) + 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) +} + +// GarbageCollector_ReDropCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReDropCollection' +type GarbageCollector_ReDropCollection_Call struct { + *mock.Call +} + +// ReDropCollection is a helper method to define mock.On call +// - collMeta *model.Collection +// - ts uint64 +func (_e *GarbageCollector_Expecter) ReDropCollection(collMeta interface{}, ts interface{}) *GarbageCollector_ReDropCollection_Call { + return &GarbageCollector_ReDropCollection_Call{Call: _e.mock.On("ReDropCollection", collMeta, ts)} +} + +func (_c *GarbageCollector_ReDropCollection_Call) Run(run func(collMeta *model.Collection, ts uint64)) *GarbageCollector_ReDropCollection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Collection), args[1].(uint64)) + }) + return _c +} + +func (_c *GarbageCollector_ReDropCollection_Call) Return() *GarbageCollector_ReDropCollection_Call { + _c.Call.Return() + return _c +} + +// ReDropPartition provides a mock function with given fields: pChannels, partition, ts +func (_m *GarbageCollector) ReDropPartition(pChannels []string, partition *model.Partition, ts uint64) { + _m.Called(pChannels, partition, ts) +} + +// GarbageCollector_ReDropPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReDropPartition' +type GarbageCollector_ReDropPartition_Call struct { + *mock.Call +} + +// ReDropPartition is a helper method to define mock.On call +// - pChannels []string +// - partition *model.Partition +// - ts uint64 +func (_e *GarbageCollector_Expecter) ReDropPartition(pChannels interface{}, partition interface{}, ts interface{}) *GarbageCollector_ReDropPartition_Call { + return &GarbageCollector_ReDropPartition_Call{Call: _e.mock.On("ReDropPartition", pChannels, partition, ts)} +} + +func (_c *GarbageCollector_ReDropPartition_Call) Run(run func(pChannels []string, partition *model.Partition, ts uint64)) *GarbageCollector_ReDropPartition_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(*model.Partition), args[2].(uint64)) + }) + return _c +} + +func (_c *GarbageCollector_ReDropPartition_Call) Return() *GarbageCollector_ReDropPartition_Call { + _c.Call.Return() + return _c +} + +// RemoveCreatingCollection provides a mock function with given fields: collMeta +func (_m *GarbageCollector) RemoveCreatingCollection(collMeta *model.Collection) { + _m.Called(collMeta) +} + +// GarbageCollector_RemoveCreatingCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCreatingCollection' +type GarbageCollector_RemoveCreatingCollection_Call struct { + *mock.Call +} + +// RemoveCreatingCollection is a helper method to define mock.On call +// - collMeta *model.Collection +func (_e *GarbageCollector_Expecter) RemoveCreatingCollection(collMeta interface{}) *GarbageCollector_RemoveCreatingCollection_Call { + return &GarbageCollector_RemoveCreatingCollection_Call{Call: _e.mock.On("RemoveCreatingCollection", collMeta)} +} + +func (_c *GarbageCollector_RemoveCreatingCollection_Call) Run(run func(collMeta *model.Collection)) *GarbageCollector_RemoveCreatingCollection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.Collection)) + }) + return _c +} + +func (_c *GarbageCollector_RemoveCreatingCollection_Call) Return() *GarbageCollector_RemoveCreatingCollection_Call { + _c.Call.Return() + return _c +} + +type mockConstructorTestingTNewGarbageCollector interface { + mock.TestingT + Cleanup(func()) +} + +// NewGarbageCollector creates a new instance of GarbageCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewGarbageCollector(t mockConstructorTestingTNewGarbageCollector) *GarbageCollector { + mock := &GarbageCollector{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/rootcoord/mocks/meta_table.go b/internal/rootcoord/mocks/meta_table.go new file mode 100644 index 0000000000..8d7d35da04 --- /dev/null +++ b/internal/rootcoord/mocks/meta_table.go @@ -0,0 +1,1505 @@ +// Code generated by mockery v2.16.0. DO NOT EDIT. + +package mockrootcoord + +import ( + context "context" + + etcdpb "github.com/milvus-io/milvus/internal/proto/etcdpb" + internalpb "github.com/milvus-io/milvus/internal/proto/internalpb" + + milvuspb "github.com/milvus-io/milvus-proto/go-api/milvuspb" + + mock "github.com/stretchr/testify/mock" + + model "github.com/milvus-io/milvus/internal/metastore/model" +) + +// IMetaTable is an autogenerated mock type for the IMetaTable type +type IMetaTable struct { + mock.Mock +} + +type IMetaTable_Expecter struct { + mock *mock.Mock +} + +func (_m *IMetaTable) EXPECT() *IMetaTable_Expecter { + return &IMetaTable_Expecter{mock: &_m.Mock} +} + +// AddCollection provides a mock function with given fields: ctx, coll +func (_m *IMetaTable) AddCollection(ctx context.Context, coll *model.Collection) error { + ret := _m.Called(ctx, coll) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Collection) error); ok { + r0 = rf(ctx, coll) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_AddCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCollection' +type IMetaTable_AddCollection_Call struct { + *mock.Call +} + +// AddCollection is a helper method to define mock.On call +// - ctx context.Context +// - coll *model.Collection +func (_e *IMetaTable_Expecter) AddCollection(ctx interface{}, coll interface{}) *IMetaTable_AddCollection_Call { + return &IMetaTable_AddCollection_Call{Call: _e.mock.On("AddCollection", ctx, coll)} +} + +func (_c *IMetaTable_AddCollection_Call) Run(run func(ctx context.Context, coll *model.Collection)) *IMetaTable_AddCollection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*model.Collection)) + }) + return _c +} + +func (_c *IMetaTable_AddCollection_Call) Return(_a0 error) *IMetaTable_AddCollection_Call { + _c.Call.Return(_a0) + return _c +} + +// AddCredential provides a mock function with given fields: credInfo +func (_m *IMetaTable) AddCredential(credInfo *internalpb.CredentialInfo) error { + ret := _m.Called(credInfo) + + var r0 error + if rf, ok := ret.Get(0).(func(*internalpb.CredentialInfo) error); ok { + r0 = rf(credInfo) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_AddCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCredential' +type IMetaTable_AddCredential_Call struct { + *mock.Call +} + +// AddCredential is a helper method to define mock.On call +// - credInfo *internalpb.CredentialInfo +func (_e *IMetaTable_Expecter) AddCredential(credInfo interface{}) *IMetaTable_AddCredential_Call { + return &IMetaTable_AddCredential_Call{Call: _e.mock.On("AddCredential", credInfo)} +} + +func (_c *IMetaTable_AddCredential_Call) Run(run func(credInfo *internalpb.CredentialInfo)) *IMetaTable_AddCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*internalpb.CredentialInfo)) + }) + return _c +} + +func (_c *IMetaTable_AddCredential_Call) Return(_a0 error) *IMetaTable_AddCredential_Call { + _c.Call.Return(_a0) + return _c +} + +// AddPartition provides a mock function with given fields: ctx, partition +func (_m *IMetaTable) AddPartition(ctx context.Context, partition *model.Partition) error { + ret := _m.Called(ctx, partition) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Partition) error); ok { + r0 = rf(ctx, partition) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_AddPartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddPartition' +type IMetaTable_AddPartition_Call struct { + *mock.Call +} + +// AddPartition is a helper method to define mock.On call +// - ctx context.Context +// - partition *model.Partition +func (_e *IMetaTable_Expecter) AddPartition(ctx interface{}, partition interface{}) *IMetaTable_AddPartition_Call { + return &IMetaTable_AddPartition_Call{Call: _e.mock.On("AddPartition", ctx, partition)} +} + +func (_c *IMetaTable_AddPartition_Call) Run(run func(ctx context.Context, partition *model.Partition)) *IMetaTable_AddPartition_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*model.Partition)) + }) + return _c +} + +func (_c *IMetaTable_AddPartition_Call) Return(_a0 error) *IMetaTable_AddPartition_Call { + _c.Call.Return(_a0) + return _c +} + +// AlterAlias provides a mock function with given fields: ctx, alias, collectionName, ts +func (_m *IMetaTable) AlterAlias(ctx context.Context, alias string, collectionName string, ts uint64) error { + ret := _m.Called(ctx, alias, collectionName, ts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) error); ok { + r0 = rf(ctx, alias, collectionName, ts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_AlterAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterAlias' +type IMetaTable_AlterAlias_Call struct { + *mock.Call +} + +// AlterAlias is a helper method to define mock.On call +// - ctx context.Context +// - alias string +// - collectionName string +// - ts uint64 +func (_e *IMetaTable_Expecter) AlterAlias(ctx interface{}, alias interface{}, collectionName interface{}, ts interface{}) *IMetaTable_AlterAlias_Call { + return &IMetaTable_AlterAlias_Call{Call: _e.mock.On("AlterAlias", ctx, alias, collectionName, ts)} +} + +func (_c *IMetaTable_AlterAlias_Call) Run(run func(ctx context.Context, alias string, collectionName string, ts uint64)) *IMetaTable_AlterAlias_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_AlterAlias_Call) Return(_a0 error) *IMetaTable_AlterAlias_Call { + _c.Call.Return(_a0) + return _c +} + +// AlterCollection provides a mock function with given fields: ctx, oldColl, newColl, ts +func (_m *IMetaTable) AlterCollection(ctx context.Context, oldColl *model.Collection, newColl *model.Collection, ts uint64) error { + ret := _m.Called(ctx, oldColl, newColl, ts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *model.Collection, *model.Collection, uint64) error); ok { + r0 = rf(ctx, oldColl, newColl, ts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_AlterCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCollection' +type IMetaTable_AlterCollection_Call struct { + *mock.Call +} + +// AlterCollection is a helper method to define mock.On call +// - ctx context.Context +// - oldColl *model.Collection +// - newColl *model.Collection +// - ts uint64 +func (_e *IMetaTable_Expecter) AlterCollection(ctx interface{}, oldColl interface{}, newColl interface{}, ts interface{}) *IMetaTable_AlterCollection_Call { + return &IMetaTable_AlterCollection_Call{Call: _e.mock.On("AlterCollection", ctx, oldColl, newColl, ts)} +} + +func (_c *IMetaTable_AlterCollection_Call) Run(run func(ctx context.Context, oldColl *model.Collection, newColl *model.Collection, ts uint64)) *IMetaTable_AlterCollection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*model.Collection), args[2].(*model.Collection), args[3].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_AlterCollection_Call) Return(_a0 error) *IMetaTable_AlterCollection_Call { + _c.Call.Return(_a0) + return _c +} + +// AlterCredential provides a mock function with given fields: credInfo +func (_m *IMetaTable) AlterCredential(credInfo *internalpb.CredentialInfo) error { + ret := _m.Called(credInfo) + + var r0 error + if rf, ok := ret.Get(0).(func(*internalpb.CredentialInfo) error); ok { + r0 = rf(credInfo) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_AlterCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AlterCredential' +type IMetaTable_AlterCredential_Call struct { + *mock.Call +} + +// AlterCredential is a helper method to define mock.On call +// - credInfo *internalpb.CredentialInfo +func (_e *IMetaTable_Expecter) AlterCredential(credInfo interface{}) *IMetaTable_AlterCredential_Call { + return &IMetaTable_AlterCredential_Call{Call: _e.mock.On("AlterCredential", credInfo)} +} + +func (_c *IMetaTable_AlterCredential_Call) Run(run func(credInfo *internalpb.CredentialInfo)) *IMetaTable_AlterCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*internalpb.CredentialInfo)) + }) + return _c +} + +func (_c *IMetaTable_AlterCredential_Call) Return(_a0 error) *IMetaTable_AlterCredential_Call { + _c.Call.Return(_a0) + return _c +} + +// ChangeCollectionState provides a mock function with given fields: ctx, collectionID, state, ts +func (_m *IMetaTable) ChangeCollectionState(ctx context.Context, collectionID int64, state etcdpb.CollectionState, ts uint64) error { + ret := _m.Called(ctx, collectionID, state, ts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, int64, etcdpb.CollectionState, uint64) error); ok { + r0 = rf(ctx, collectionID, state, ts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_ChangeCollectionState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeCollectionState' +type IMetaTable_ChangeCollectionState_Call struct { + *mock.Call +} + +// ChangeCollectionState is a helper method to define mock.On call +// - ctx context.Context +// - collectionID int64 +// - state etcdpb.CollectionState +// - ts uint64 +func (_e *IMetaTable_Expecter) ChangeCollectionState(ctx interface{}, collectionID interface{}, state interface{}, ts interface{}) *IMetaTable_ChangeCollectionState_Call { + return &IMetaTable_ChangeCollectionState_Call{Call: _e.mock.On("ChangeCollectionState", ctx, collectionID, state, ts)} +} + +func (_c *IMetaTable_ChangeCollectionState_Call) Run(run func(ctx context.Context, collectionID int64, state etcdpb.CollectionState, ts uint64)) *IMetaTable_ChangeCollectionState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(etcdpb.CollectionState), args[3].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_ChangeCollectionState_Call) Return(_a0 error) *IMetaTable_ChangeCollectionState_Call { + _c.Call.Return(_a0) + return _c +} + +// ChangePartitionState provides a mock function with given fields: ctx, collectionID, partitionID, state, ts +func (_m *IMetaTable) ChangePartitionState(ctx context.Context, collectionID int64, partitionID int64, state etcdpb.PartitionState, ts uint64) error { + ret := _m.Called(ctx, collectionID, partitionID, state, ts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, int64, int64, etcdpb.PartitionState, uint64) error); ok { + r0 = rf(ctx, collectionID, partitionID, state, ts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_ChangePartitionState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangePartitionState' +type IMetaTable_ChangePartitionState_Call struct { + *mock.Call +} + +// ChangePartitionState is a helper method to define mock.On call +// - ctx context.Context +// - collectionID int64 +// - partitionID int64 +// - state etcdpb.PartitionState +// - ts uint64 +func (_e *IMetaTable_Expecter) ChangePartitionState(ctx interface{}, collectionID interface{}, partitionID interface{}, state interface{}, ts interface{}) *IMetaTable_ChangePartitionState_Call { + return &IMetaTable_ChangePartitionState_Call{Call: _e.mock.On("ChangePartitionState", ctx, collectionID, partitionID, state, ts)} +} + +func (_c *IMetaTable_ChangePartitionState_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64, state etcdpb.PartitionState, ts uint64)) *IMetaTable_ChangePartitionState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(etcdpb.PartitionState), args[4].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_ChangePartitionState_Call) Return(_a0 error) *IMetaTable_ChangePartitionState_Call { + _c.Call.Return(_a0) + return _c +} + +// CreateAlias provides a mock function with given fields: ctx, alias, collectionName, ts +func (_m *IMetaTable) CreateAlias(ctx context.Context, alias string, collectionName string, ts uint64) error { + ret := _m.Called(ctx, alias, collectionName, ts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, uint64) error); ok { + r0 = rf(ctx, alias, collectionName, ts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_CreateAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAlias' +type IMetaTable_CreateAlias_Call struct { + *mock.Call +} + +// CreateAlias is a helper method to define mock.On call +// - ctx context.Context +// - alias string +// - collectionName string +// - ts uint64 +func (_e *IMetaTable_Expecter) CreateAlias(ctx interface{}, alias interface{}, collectionName interface{}, ts interface{}) *IMetaTable_CreateAlias_Call { + return &IMetaTable_CreateAlias_Call{Call: _e.mock.On("CreateAlias", ctx, alias, collectionName, ts)} +} + +func (_c *IMetaTable_CreateAlias_Call) Run(run func(ctx context.Context, alias string, collectionName string, ts uint64)) *IMetaTable_CreateAlias_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_CreateAlias_Call) Return(_a0 error) *IMetaTable_CreateAlias_Call { + _c.Call.Return(_a0) + return _c +} + +// CreateRole provides a mock function with given fields: tenant, entity +func (_m *IMetaTable) CreateRole(tenant string, entity *milvuspb.RoleEntity) error { + ret := _m.Called(tenant, entity) + + var r0 error + if rf, ok := ret.Get(0).(func(string, *milvuspb.RoleEntity) error); ok { + r0 = rf(tenant, entity) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_CreateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRole' +type IMetaTable_CreateRole_Call struct { + *mock.Call +} + +// CreateRole is a helper method to define mock.On call +// - tenant string +// - entity *milvuspb.RoleEntity +func (_e *IMetaTable_Expecter) CreateRole(tenant interface{}, entity interface{}) *IMetaTable_CreateRole_Call { + return &IMetaTable_CreateRole_Call{Call: _e.mock.On("CreateRole", tenant, entity)} +} + +func (_c *IMetaTable_CreateRole_Call) Run(run func(tenant string, entity *milvuspb.RoleEntity)) *IMetaTable_CreateRole_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*milvuspb.RoleEntity)) + }) + return _c +} + +func (_c *IMetaTable_CreateRole_Call) Return(_a0 error) *IMetaTable_CreateRole_Call { + _c.Call.Return(_a0) + return _c +} + +// DeleteCredential provides a mock function with given fields: username +func (_m *IMetaTable) DeleteCredential(username string) error { + ret := _m.Called(username) + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(username) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_DeleteCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCredential' +type IMetaTable_DeleteCredential_Call struct { + *mock.Call +} + +// DeleteCredential is a helper method to define mock.On call +// - username string +func (_e *IMetaTable_Expecter) DeleteCredential(username interface{}) *IMetaTable_DeleteCredential_Call { + return &IMetaTable_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", username)} +} + +func (_c *IMetaTable_DeleteCredential_Call) Run(run func(username string)) *IMetaTable_DeleteCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *IMetaTable_DeleteCredential_Call) Return(_a0 error) *IMetaTable_DeleteCredential_Call { + _c.Call.Return(_a0) + return _c +} + +// DropAlias provides a mock function with given fields: ctx, alias, ts +func (_m *IMetaTable) DropAlias(ctx context.Context, alias string, ts uint64) error { + ret := _m.Called(ctx, alias, ts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, uint64) error); ok { + r0 = rf(ctx, alias, ts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_DropAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropAlias' +type IMetaTable_DropAlias_Call struct { + *mock.Call +} + +// DropAlias is a helper method to define mock.On call +// - ctx context.Context +// - alias string +// - ts uint64 +func (_e *IMetaTable_Expecter) DropAlias(ctx interface{}, alias interface{}, ts interface{}) *IMetaTable_DropAlias_Call { + return &IMetaTable_DropAlias_Call{Call: _e.mock.On("DropAlias", ctx, alias, ts)} +} + +func (_c *IMetaTable_DropAlias_Call) Run(run func(ctx context.Context, alias string, ts uint64)) *IMetaTable_DropAlias_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_DropAlias_Call) Return(_a0 error) *IMetaTable_DropAlias_Call { + _c.Call.Return(_a0) + return _c +} + +// DropGrant provides a mock function with given fields: tenant, role +func (_m *IMetaTable) DropGrant(tenant string, role *milvuspb.RoleEntity) error { + ret := _m.Called(tenant, role) + + var r0 error + if rf, ok := ret.Get(0).(func(string, *milvuspb.RoleEntity) error); ok { + r0 = rf(tenant, role) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_DropGrant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropGrant' +type IMetaTable_DropGrant_Call struct { + *mock.Call +} + +// DropGrant is a helper method to define mock.On call +// - tenant string +// - role *milvuspb.RoleEntity +func (_e *IMetaTable_Expecter) DropGrant(tenant interface{}, role interface{}) *IMetaTable_DropGrant_Call { + return &IMetaTable_DropGrant_Call{Call: _e.mock.On("DropGrant", tenant, role)} +} + +func (_c *IMetaTable_DropGrant_Call) Run(run func(tenant string, role *milvuspb.RoleEntity)) *IMetaTable_DropGrant_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*milvuspb.RoleEntity)) + }) + return _c +} + +func (_c *IMetaTable_DropGrant_Call) Return(_a0 error) *IMetaTable_DropGrant_Call { + _c.Call.Return(_a0) + return _c +} + +// DropRole provides a mock function with given fields: tenant, roleName +func (_m *IMetaTable) DropRole(tenant string, roleName string) error { + ret := _m.Called(tenant, roleName) + + var r0 error + if rf, ok := ret.Get(0).(func(string, string) error); ok { + r0 = rf(tenant, roleName) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_DropRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropRole' +type IMetaTable_DropRole_Call struct { + *mock.Call +} + +// DropRole is a helper method to define mock.On call +// - tenant string +// - roleName string +func (_e *IMetaTable_Expecter) DropRole(tenant interface{}, roleName interface{}) *IMetaTable_DropRole_Call { + return &IMetaTable_DropRole_Call{Call: _e.mock.On("DropRole", tenant, roleName)} +} + +func (_c *IMetaTable_DropRole_Call) Run(run func(tenant string, roleName string)) *IMetaTable_DropRole_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *IMetaTable_DropRole_Call) Return(_a0 error) *IMetaTable_DropRole_Call { + _c.Call.Return(_a0) + return _c +} + +// GetCollectionByID provides a mock function with given fields: ctx, collectionID, ts, allowUnavailable +func (_m *IMetaTable) GetCollectionByID(ctx context.Context, collectionID int64, ts uint64, allowUnavailable bool) (*model.Collection, error) { + ret := _m.Called(ctx, collectionID, ts, allowUnavailable) + + var r0 *model.Collection + if rf, ok := ret.Get(0).(func(context.Context, int64, uint64, bool) *model.Collection); ok { + r0 = rf(ctx, collectionID, ts, allowUnavailable) + } 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, bool) error); ok { + r1 = rf(ctx, collectionID, ts, allowUnavailable) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_GetCollectionByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionByID' +type IMetaTable_GetCollectionByID_Call struct { + *mock.Call +} + +// GetCollectionByID is a helper method to define mock.On call +// - ctx context.Context +// - collectionID int64 +// - ts uint64 +// - allowUnavailable bool +func (_e *IMetaTable_Expecter) GetCollectionByID(ctx interface{}, collectionID interface{}, ts interface{}, allowUnavailable interface{}) *IMetaTable_GetCollectionByID_Call { + return &IMetaTable_GetCollectionByID_Call{Call: _e.mock.On("GetCollectionByID", ctx, collectionID, ts, allowUnavailable)} +} + +func (_c *IMetaTable_GetCollectionByID_Call) Run(run func(ctx context.Context, collectionID int64, ts uint64, allowUnavailable bool)) *IMetaTable_GetCollectionByID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(uint64), args[3].(bool)) + }) + return _c +} + +func (_c *IMetaTable_GetCollectionByID_Call) Return(_a0 *model.Collection, _a1 error) *IMetaTable_GetCollectionByID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// GetCollectionByName provides a mock function with given fields: ctx, collectionName, ts +func (_m *IMetaTable) GetCollectionByName(ctx context.Context, collectionName string, ts uint64) (*model.Collection, error) { + ret := _m.Called(ctx, collectionName, ts) + + var r0 *model.Collection + if rf, ok := ret.Get(0).(func(context.Context, string, uint64) *model.Collection); ok { + r0 = rf(ctx, 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, string, uint64) error); ok { + r1 = rf(ctx, collectionName, ts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_GetCollectionByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionByName' +type IMetaTable_GetCollectionByName_Call struct { + *mock.Call +} + +// GetCollectionByName is a helper method to define mock.On call +// - ctx context.Context +// - collectionName string +// - ts uint64 +func (_e *IMetaTable_Expecter) GetCollectionByName(ctx interface{}, collectionName interface{}, ts interface{}) *IMetaTable_GetCollectionByName_Call { + return &IMetaTable_GetCollectionByName_Call{Call: _e.mock.On("GetCollectionByName", ctx, collectionName, ts)} +} + +func (_c *IMetaTable_GetCollectionByName_Call) Run(run func(ctx context.Context, collectionName string, ts uint64)) *IMetaTable_GetCollectionByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_GetCollectionByName_Call) Return(_a0 *model.Collection, _a1 error) *IMetaTable_GetCollectionByName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// GetCollectionVirtualChannels provides a mock function with given fields: colID +func (_m *IMetaTable) GetCollectionVirtualChannels(colID int64) []string { + ret := _m.Called(colID) + + var r0 []string + if rf, ok := ret.Get(0).(func(int64) []string); ok { + r0 = rf(colID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + return r0 +} + +// IMetaTable_GetCollectionVirtualChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCollectionVirtualChannels' +type IMetaTable_GetCollectionVirtualChannels_Call struct { + *mock.Call +} + +// GetCollectionVirtualChannels is a helper method to define mock.On call +// - colID int64 +func (_e *IMetaTable_Expecter) GetCollectionVirtualChannels(colID interface{}) *IMetaTable_GetCollectionVirtualChannels_Call { + return &IMetaTable_GetCollectionVirtualChannels_Call{Call: _e.mock.On("GetCollectionVirtualChannels", colID)} +} + +func (_c *IMetaTable_GetCollectionVirtualChannels_Call) Run(run func(colID int64)) *IMetaTable_GetCollectionVirtualChannels_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *IMetaTable_GetCollectionVirtualChannels_Call) Return(_a0 []string) *IMetaTable_GetCollectionVirtualChannels_Call { + _c.Call.Return(_a0) + return _c +} + +// GetCredential provides a mock function with given fields: username +func (_m *IMetaTable) GetCredential(username string) (*internalpb.CredentialInfo, error) { + ret := _m.Called(username) + + var r0 *internalpb.CredentialInfo + if rf, ok := ret.Get(0).(func(string) *internalpb.CredentialInfo); ok { + r0 = rf(username) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*internalpb.CredentialInfo) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(username) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_GetCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredential' +type IMetaTable_GetCredential_Call struct { + *mock.Call +} + +// GetCredential is a helper method to define mock.On call +// - username string +func (_e *IMetaTable_Expecter) GetCredential(username interface{}) *IMetaTable_GetCredential_Call { + return &IMetaTable_GetCredential_Call{Call: _e.mock.On("GetCredential", username)} +} + +func (_c *IMetaTable_GetCredential_Call) Run(run func(username string)) *IMetaTable_GetCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *IMetaTable_GetCredential_Call) Return(_a0 *internalpb.CredentialInfo, _a1 error) *IMetaTable_GetCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// GetPartitionByName provides a mock function with given fields: collID, partitionName, ts +func (_m *IMetaTable) GetPartitionByName(collID int64, partitionName string, ts uint64) (int64, error) { + ret := _m.Called(collID, partitionName, ts) + + var r0 int64 + if rf, ok := ret.Get(0).(func(int64, string, uint64) int64); ok { + r0 = rf(collID, partitionName, ts) + } else { + r0 = ret.Get(0).(int64) + } + + var r1 error + if rf, ok := ret.Get(1).(func(int64, string, uint64) error); ok { + r1 = rf(collID, partitionName, ts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_GetPartitionByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionByName' +type IMetaTable_GetPartitionByName_Call struct { + *mock.Call +} + +// GetPartitionByName is a helper method to define mock.On call +// - collID int64 +// - partitionName string +// - ts uint64 +func (_e *IMetaTable_Expecter) GetPartitionByName(collID interface{}, partitionName interface{}, ts interface{}) *IMetaTable_GetPartitionByName_Call { + return &IMetaTable_GetPartitionByName_Call{Call: _e.mock.On("GetPartitionByName", collID, partitionName, ts)} +} + +func (_c *IMetaTable_GetPartitionByName_Call) Run(run func(collID int64, partitionName string, ts uint64)) *IMetaTable_GetPartitionByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(string), args[2].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_GetPartitionByName_Call) Return(_a0 int64, _a1 error) *IMetaTable_GetPartitionByName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// GetPartitionNameByID provides a mock function with given fields: collID, partitionID, ts +func (_m *IMetaTable) GetPartitionNameByID(collID int64, partitionID int64, ts uint64) (string, error) { + ret := _m.Called(collID, partitionID, ts) + + var r0 string + if rf, ok := ret.Get(0).(func(int64, int64, uint64) string); ok { + r0 = rf(collID, partitionID, ts) + } else { + r0 = ret.Get(0).(string) + } + + var r1 error + if rf, ok := ret.Get(1).(func(int64, int64, uint64) error); ok { + r1 = rf(collID, partitionID, ts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_GetPartitionNameByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionNameByID' +type IMetaTable_GetPartitionNameByID_Call struct { + *mock.Call +} + +// GetPartitionNameByID is a helper method to define mock.On call +// - collID int64 +// - partitionID int64 +// - ts uint64 +func (_e *IMetaTable_Expecter) GetPartitionNameByID(collID interface{}, partitionID interface{}, ts interface{}) *IMetaTable_GetPartitionNameByID_Call { + return &IMetaTable_GetPartitionNameByID_Call{Call: _e.mock.On("GetPartitionNameByID", collID, partitionID, ts)} +} + +func (_c *IMetaTable_GetPartitionNameByID_Call) Run(run func(collID int64, partitionID int64, ts uint64)) *IMetaTable_GetPartitionNameByID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(int64), args[2].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_GetPartitionNameByID_Call) Return(_a0 string, _a1 error) *IMetaTable_GetPartitionNameByID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// IsAlias provides a mock function with given fields: name +func (_m *IMetaTable) IsAlias(name string) bool { + ret := _m.Called(name) + + var r0 bool + if rf, ok := ret.Get(0).(func(string) bool); ok { + r0 = rf(name) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// IMetaTable_IsAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAlias' +type IMetaTable_IsAlias_Call struct { + *mock.Call +} + +// IsAlias is a helper method to define mock.On call +// - name string +func (_e *IMetaTable_Expecter) IsAlias(name interface{}) *IMetaTable_IsAlias_Call { + return &IMetaTable_IsAlias_Call{Call: _e.mock.On("IsAlias", name)} +} + +func (_c *IMetaTable_IsAlias_Call) Run(run func(name string)) *IMetaTable_IsAlias_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *IMetaTable_IsAlias_Call) Return(_a0 bool) *IMetaTable_IsAlias_Call { + _c.Call.Return(_a0) + return _c +} + +// ListAbnormalCollections provides a mock function with given fields: ctx, ts +func (_m *IMetaTable) ListAbnormalCollections(ctx context.Context, ts uint64) ([]*model.Collection, error) { + ret := _m.Called(ctx, ts) + + var r0 []*model.Collection + if rf, ok := ret.Get(0).(func(context.Context, uint64) []*model.Collection); ok { + r0 = rf(ctx, 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, uint64) error); ok { + r1 = rf(ctx, ts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_ListAbnormalCollections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAbnormalCollections' +type IMetaTable_ListAbnormalCollections_Call struct { + *mock.Call +} + +// ListAbnormalCollections is a helper method to define mock.On call +// - ctx context.Context +// - ts uint64 +func (_e *IMetaTable_Expecter) ListAbnormalCollections(ctx interface{}, ts interface{}) *IMetaTable_ListAbnormalCollections_Call { + return &IMetaTable_ListAbnormalCollections_Call{Call: _e.mock.On("ListAbnormalCollections", ctx, ts)} +} + +func (_c *IMetaTable_ListAbnormalCollections_Call) Run(run func(ctx context.Context, ts uint64)) *IMetaTable_ListAbnormalCollections_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_ListAbnormalCollections_Call) Return(_a0 []*model.Collection, _a1 error) *IMetaTable_ListAbnormalCollections_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// ListAliasesByID provides a mock function with given fields: collID +func (_m *IMetaTable) ListAliasesByID(collID int64) []string { + ret := _m.Called(collID) + + var r0 []string + if rf, ok := ret.Get(0).(func(int64) []string); ok { + r0 = rf(collID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + return r0 +} + +// IMetaTable_ListAliasesByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAliasesByID' +type IMetaTable_ListAliasesByID_Call struct { + *mock.Call +} + +// ListAliasesByID is a helper method to define mock.On call +// - collID int64 +func (_e *IMetaTable_Expecter) ListAliasesByID(collID interface{}) *IMetaTable_ListAliasesByID_Call { + return &IMetaTable_ListAliasesByID_Call{Call: _e.mock.On("ListAliasesByID", collID)} +} + +func (_c *IMetaTable_ListAliasesByID_Call) Run(run func(collID int64)) *IMetaTable_ListAliasesByID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *IMetaTable_ListAliasesByID_Call) Return(_a0 []string) *IMetaTable_ListAliasesByID_Call { + _c.Call.Return(_a0) + return _c +} + +// ListCollectionPhysicalChannels provides a mock function with given fields: +func (_m *IMetaTable) ListCollectionPhysicalChannels() map[int64][]string { + ret := _m.Called() + + var r0 map[int64][]string + if rf, ok := ret.Get(0).(func() map[int64][]string); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[int64][]string) + } + } + + return r0 +} + +// IMetaTable_ListCollectionPhysicalChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCollectionPhysicalChannels' +type IMetaTable_ListCollectionPhysicalChannels_Call struct { + *mock.Call +} + +// ListCollectionPhysicalChannels is a helper method to define mock.On call +func (_e *IMetaTable_Expecter) ListCollectionPhysicalChannels() *IMetaTable_ListCollectionPhysicalChannels_Call { + return &IMetaTable_ListCollectionPhysicalChannels_Call{Call: _e.mock.On("ListCollectionPhysicalChannels")} +} + +func (_c *IMetaTable_ListCollectionPhysicalChannels_Call) Run(run func()) *IMetaTable_ListCollectionPhysicalChannels_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *IMetaTable_ListCollectionPhysicalChannels_Call) Return(_a0 map[int64][]string) *IMetaTable_ListCollectionPhysicalChannels_Call { + _c.Call.Return(_a0) + return _c +} + +// ListCollections provides a mock function with given fields: ctx, ts +func (_m *IMetaTable) ListCollections(ctx context.Context, ts uint64) ([]*model.Collection, error) { + ret := _m.Called(ctx, ts) + + var r0 []*model.Collection + if rf, ok := ret.Get(0).(func(context.Context, uint64) []*model.Collection); ok { + r0 = rf(ctx, 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, uint64) error); ok { + r1 = rf(ctx, ts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_ListCollections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCollections' +type IMetaTable_ListCollections_Call struct { + *mock.Call +} + +// ListCollections is a helper method to define mock.On call +// - ctx context.Context +// - ts uint64 +func (_e *IMetaTable_Expecter) ListCollections(ctx interface{}, ts interface{}) *IMetaTable_ListCollections_Call { + return &IMetaTable_ListCollections_Call{Call: _e.mock.On("ListCollections", ctx, ts)} +} + +func (_c *IMetaTable_ListCollections_Call) Run(run func(ctx context.Context, ts uint64)) *IMetaTable_ListCollections_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_ListCollections_Call) Return(_a0 []*model.Collection, _a1 error) *IMetaTable_ListCollections_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// ListCredentialUsernames provides a mock function with given fields: +func (_m *IMetaTable) ListCredentialUsernames() (*milvuspb.ListCredUsersResponse, error) { + ret := _m.Called() + + var r0 *milvuspb.ListCredUsersResponse + if rf, ok := ret.Get(0).(func() *milvuspb.ListCredUsersResponse); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*milvuspb.ListCredUsersResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_ListCredentialUsernames_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCredentialUsernames' +type IMetaTable_ListCredentialUsernames_Call struct { + *mock.Call +} + +// ListCredentialUsernames is a helper method to define mock.On call +func (_e *IMetaTable_Expecter) ListCredentialUsernames() *IMetaTable_ListCredentialUsernames_Call { + return &IMetaTable_ListCredentialUsernames_Call{Call: _e.mock.On("ListCredentialUsernames")} +} + +func (_c *IMetaTable_ListCredentialUsernames_Call) Run(run func()) *IMetaTable_ListCredentialUsernames_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *IMetaTable_ListCredentialUsernames_Call) Return(_a0 *milvuspb.ListCredUsersResponse, _a1 error) *IMetaTable_ListCredentialUsernames_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// ListPolicy provides a mock function with given fields: tenant +func (_m *IMetaTable) ListPolicy(tenant string) ([]string, error) { + ret := _m.Called(tenant) + + var r0 []string + if rf, ok := ret.Get(0).(func(string) []string); ok { + r0 = rf(tenant) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(tenant) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_ListPolicy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPolicy' +type IMetaTable_ListPolicy_Call struct { + *mock.Call +} + +// ListPolicy is a helper method to define mock.On call +// - tenant string +func (_e *IMetaTable_Expecter) ListPolicy(tenant interface{}) *IMetaTable_ListPolicy_Call { + return &IMetaTable_ListPolicy_Call{Call: _e.mock.On("ListPolicy", tenant)} +} + +func (_c *IMetaTable_ListPolicy_Call) Run(run func(tenant string)) *IMetaTable_ListPolicy_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *IMetaTable_ListPolicy_Call) Return(_a0 []string, _a1 error) *IMetaTable_ListPolicy_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// ListUserRole provides a mock function with given fields: tenant +func (_m *IMetaTable) ListUserRole(tenant string) ([]string, error) { + ret := _m.Called(tenant) + + var r0 []string + if rf, ok := ret.Get(0).(func(string) []string); ok { + r0 = rf(tenant) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(tenant) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_ListUserRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUserRole' +type IMetaTable_ListUserRole_Call struct { + *mock.Call +} + +// ListUserRole is a helper method to define mock.On call +// - tenant string +func (_e *IMetaTable_Expecter) ListUserRole(tenant interface{}) *IMetaTable_ListUserRole_Call { + return &IMetaTable_ListUserRole_Call{Call: _e.mock.On("ListUserRole", tenant)} +} + +func (_c *IMetaTable_ListUserRole_Call) Run(run func(tenant string)) *IMetaTable_ListUserRole_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *IMetaTable_ListUserRole_Call) Return(_a0 []string, _a1 error) *IMetaTable_ListUserRole_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// OperatePrivilege provides a mock function with given fields: tenant, entity, operateType +func (_m *IMetaTable) OperatePrivilege(tenant string, entity *milvuspb.GrantEntity, operateType milvuspb.OperatePrivilegeType) error { + ret := _m.Called(tenant, entity, operateType) + + var r0 error + if rf, ok := ret.Get(0).(func(string, *milvuspb.GrantEntity, milvuspb.OperatePrivilegeType) error); ok { + r0 = rf(tenant, entity, operateType) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_OperatePrivilege_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperatePrivilege' +type IMetaTable_OperatePrivilege_Call struct { + *mock.Call +} + +// OperatePrivilege is a helper method to define mock.On call +// - tenant string +// - entity *milvuspb.GrantEntity +// - operateType milvuspb.OperatePrivilegeType +func (_e *IMetaTable_Expecter) OperatePrivilege(tenant interface{}, entity interface{}, operateType interface{}) *IMetaTable_OperatePrivilege_Call { + return &IMetaTable_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", tenant, entity, operateType)} +} + +func (_c *IMetaTable_OperatePrivilege_Call) Run(run func(tenant string, entity *milvuspb.GrantEntity, operateType milvuspb.OperatePrivilegeType)) *IMetaTable_OperatePrivilege_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*milvuspb.GrantEntity), args[2].(milvuspb.OperatePrivilegeType)) + }) + return _c +} + +func (_c *IMetaTable_OperatePrivilege_Call) Return(_a0 error) *IMetaTable_OperatePrivilege_Call { + _c.Call.Return(_a0) + return _c +} + +// OperateUserRole provides a mock function with given fields: tenant, userEntity, roleEntity, operateType +func (_m *IMetaTable) OperateUserRole(tenant string, userEntity *milvuspb.UserEntity, roleEntity *milvuspb.RoleEntity, operateType milvuspb.OperateUserRoleType) error { + ret := _m.Called(tenant, userEntity, roleEntity, operateType) + + var r0 error + if rf, ok := ret.Get(0).(func(string, *milvuspb.UserEntity, *milvuspb.RoleEntity, milvuspb.OperateUserRoleType) error); ok { + r0 = rf(tenant, userEntity, roleEntity, operateType) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_OperateUserRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperateUserRole' +type IMetaTable_OperateUserRole_Call struct { + *mock.Call +} + +// OperateUserRole is a helper method to define mock.On call +// - tenant string +// - userEntity *milvuspb.UserEntity +// - roleEntity *milvuspb.RoleEntity +// - operateType milvuspb.OperateUserRoleType +func (_e *IMetaTable_Expecter) OperateUserRole(tenant interface{}, userEntity interface{}, roleEntity interface{}, operateType interface{}) *IMetaTable_OperateUserRole_Call { + return &IMetaTable_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", tenant, userEntity, roleEntity, operateType)} +} + +func (_c *IMetaTable_OperateUserRole_Call) Run(run func(tenant string, userEntity *milvuspb.UserEntity, roleEntity *milvuspb.RoleEntity, operateType milvuspb.OperateUserRoleType)) *IMetaTable_OperateUserRole_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*milvuspb.UserEntity), args[2].(*milvuspb.RoleEntity), args[3].(milvuspb.OperateUserRoleType)) + }) + return _c +} + +func (_c *IMetaTable_OperateUserRole_Call) Return(_a0 error) *IMetaTable_OperateUserRole_Call { + _c.Call.Return(_a0) + return _c +} + +// RemoveCollection provides a mock function with given fields: ctx, collectionID, ts +func (_m *IMetaTable) RemoveCollection(ctx context.Context, collectionID int64, ts uint64) error { + ret := _m.Called(ctx, collectionID, ts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, int64, uint64) error); ok { + r0 = rf(ctx, collectionID, ts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_RemoveCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveCollection' +type IMetaTable_RemoveCollection_Call struct { + *mock.Call +} + +// RemoveCollection is a helper method to define mock.On call +// - ctx context.Context +// - collectionID int64 +// - ts uint64 +func (_e *IMetaTable_Expecter) RemoveCollection(ctx interface{}, collectionID interface{}, ts interface{}) *IMetaTable_RemoveCollection_Call { + return &IMetaTable_RemoveCollection_Call{Call: _e.mock.On("RemoveCollection", ctx, collectionID, ts)} +} + +func (_c *IMetaTable_RemoveCollection_Call) Run(run func(ctx context.Context, collectionID int64, ts uint64)) *IMetaTable_RemoveCollection_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_RemoveCollection_Call) Return(_a0 error) *IMetaTable_RemoveCollection_Call { + _c.Call.Return(_a0) + return _c +} + +// RemovePartition provides a mock function with given fields: ctx, collectionID, partitionID, ts +func (_m *IMetaTable) RemovePartition(ctx context.Context, collectionID int64, partitionID int64, ts uint64) error { + ret := _m.Called(ctx, collectionID, partitionID, ts) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, int64, int64, uint64) error); ok { + r0 = rf(ctx, collectionID, partitionID, ts) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IMetaTable_RemovePartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePartition' +type IMetaTable_RemovePartition_Call struct { + *mock.Call +} + +// RemovePartition is a helper method to define mock.On call +// - ctx context.Context +// - collectionID int64 +// - partitionID int64 +// - ts uint64 +func (_e *IMetaTable_Expecter) RemovePartition(ctx interface{}, collectionID interface{}, partitionID interface{}, ts interface{}) *IMetaTable_RemovePartition_Call { + return &IMetaTable_RemovePartition_Call{Call: _e.mock.On("RemovePartition", ctx, collectionID, partitionID, ts)} +} + +func (_c *IMetaTable_RemovePartition_Call) Run(run func(ctx context.Context, collectionID int64, partitionID int64, ts uint64)) *IMetaTable_RemovePartition_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(uint64)) + }) + return _c +} + +func (_c *IMetaTable_RemovePartition_Call) Return(_a0 error) *IMetaTable_RemovePartition_Call { + _c.Call.Return(_a0) + return _c +} + +// SelectGrant provides a mock function with given fields: tenant, entity +func (_m *IMetaTable) SelectGrant(tenant string, entity *milvuspb.GrantEntity) ([]*milvuspb.GrantEntity, error) { + ret := _m.Called(tenant, entity) + + var r0 []*milvuspb.GrantEntity + if rf, ok := ret.Get(0).(func(string, *milvuspb.GrantEntity) []*milvuspb.GrantEntity); ok { + r0 = rf(tenant, entity) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*milvuspb.GrantEntity) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string, *milvuspb.GrantEntity) error); ok { + r1 = rf(tenant, entity) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_SelectGrant_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectGrant' +type IMetaTable_SelectGrant_Call struct { + *mock.Call +} + +// SelectGrant is a helper method to define mock.On call +// - tenant string +// - entity *milvuspb.GrantEntity +func (_e *IMetaTable_Expecter) SelectGrant(tenant interface{}, entity interface{}) *IMetaTable_SelectGrant_Call { + return &IMetaTable_SelectGrant_Call{Call: _e.mock.On("SelectGrant", tenant, entity)} +} + +func (_c *IMetaTable_SelectGrant_Call) Run(run func(tenant string, entity *milvuspb.GrantEntity)) *IMetaTable_SelectGrant_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*milvuspb.GrantEntity)) + }) + return _c +} + +func (_c *IMetaTable_SelectGrant_Call) Return(_a0 []*milvuspb.GrantEntity, _a1 error) *IMetaTable_SelectGrant_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// SelectRole provides a mock function with given fields: tenant, entity, includeUserInfo +func (_m *IMetaTable) SelectRole(tenant string, entity *milvuspb.RoleEntity, includeUserInfo bool) ([]*milvuspb.RoleResult, error) { + ret := _m.Called(tenant, entity, includeUserInfo) + + var r0 []*milvuspb.RoleResult + if rf, ok := ret.Get(0).(func(string, *milvuspb.RoleEntity, bool) []*milvuspb.RoleResult); ok { + r0 = rf(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(string, *milvuspb.RoleEntity, bool) error); ok { + r1 = rf(tenant, entity, includeUserInfo) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_SelectRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectRole' +type IMetaTable_SelectRole_Call struct { + *mock.Call +} + +// SelectRole is a helper method to define mock.On call +// - tenant string +// - entity *milvuspb.RoleEntity +// - includeUserInfo bool +func (_e *IMetaTable_Expecter) SelectRole(tenant interface{}, entity interface{}, includeUserInfo interface{}) *IMetaTable_SelectRole_Call { + return &IMetaTable_SelectRole_Call{Call: _e.mock.On("SelectRole", tenant, entity, includeUserInfo)} +} + +func (_c *IMetaTable_SelectRole_Call) Run(run func(tenant string, entity *milvuspb.RoleEntity, includeUserInfo bool)) *IMetaTable_SelectRole_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*milvuspb.RoleEntity), args[2].(bool)) + }) + return _c +} + +func (_c *IMetaTable_SelectRole_Call) Return(_a0 []*milvuspb.RoleResult, _a1 error) *IMetaTable_SelectRole_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// SelectUser provides a mock function with given fields: tenant, entity, includeRoleInfo +func (_m *IMetaTable) SelectUser(tenant string, entity *milvuspb.UserEntity, includeRoleInfo bool) ([]*milvuspb.UserResult, error) { + ret := _m.Called(tenant, entity, includeRoleInfo) + + var r0 []*milvuspb.UserResult + if rf, ok := ret.Get(0).(func(string, *milvuspb.UserEntity, bool) []*milvuspb.UserResult); ok { + r0 = rf(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(string, *milvuspb.UserEntity, bool) error); ok { + r1 = rf(tenant, entity, includeRoleInfo) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// IMetaTable_SelectUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectUser' +type IMetaTable_SelectUser_Call struct { + *mock.Call +} + +// SelectUser is a helper method to define mock.On call +// - tenant string +// - entity *milvuspb.UserEntity +// - includeRoleInfo bool +func (_e *IMetaTable_Expecter) SelectUser(tenant interface{}, entity interface{}, includeRoleInfo interface{}) *IMetaTable_SelectUser_Call { + return &IMetaTable_SelectUser_Call{Call: _e.mock.On("SelectUser", tenant, entity, includeRoleInfo)} +} + +func (_c *IMetaTable_SelectUser_Call) Run(run func(tenant string, entity *milvuspb.UserEntity, includeRoleInfo bool)) *IMetaTable_SelectUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*milvuspb.UserEntity), args[2].(bool)) + }) + return _c +} + +func (_c *IMetaTable_SelectUser_Call) Return(_a0 []*milvuspb.UserResult, _a1 error) *IMetaTable_SelectUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +type mockConstructorTestingTNewIMetaTable interface { + mock.TestingT + Cleanup(func()) +} + +// NewIMetaTable creates a new instance of IMetaTable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewIMetaTable(t mockConstructorTestingTNewIMetaTable) *IMetaTable { + mock := &IMetaTable{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/tso/mocks/Allocator.go b/internal/tso/mocks/allocator.go similarity index 100% rename from internal/tso/mocks/Allocator.go rename to internal/tso/mocks/allocator.go