diff --git a/internal/proxy/mock_cache.go b/internal/proxy/mock_cache.go index d34096cda27af..e33dd84263935 100644 --- a/internal/proxy/mock_cache.go +++ b/internal/proxy/mock_cache.go @@ -1157,6 +1157,42 @@ func (_c *MockCache_RemoveDatabase_Call) RunAndReturn(run func(context.Context, return _c } +// RemovePartition provides a mock function with given fields: ctx, database, collectionName, partitionName +func (_m *MockCache) RemovePartition(ctx context.Context, database string, collectionName string, partitionName string) { + _m.Called(ctx, database, collectionName, partitionName) +} + +// MockCache_RemovePartition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePartition' +type MockCache_RemovePartition_Call struct { + *mock.Call +} + +// RemovePartition is a helper method to define mock.On call +// - ctx context.Context +// - database string +// - collectionName string +// - partitionName string +func (_e *MockCache_Expecter) RemovePartition(ctx interface{}, database interface{}, collectionName interface{}, partitionName interface{}) *MockCache_RemovePartition_Call { + return &MockCache_RemovePartition_Call{Call: _e.mock.On("RemovePartition", ctx, database, collectionName, partitionName)} +} + +func (_c *MockCache_RemovePartition_Call) Run(run func(ctx context.Context, database string, collectionName string, partitionName string)) *MockCache_RemovePartition_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *MockCache_RemovePartition_Call) Return() *MockCache_RemovePartition_Call { + _c.Call.Return() + return _c +} + +func (_c *MockCache_RemovePartition_Call) RunAndReturn(run func(context.Context, string, string, string)) *MockCache_RemovePartition_Call { + _c.Call.Return(run) + return _c +} + // UpdateCredential provides a mock function with given fields: credInfo func (_m *MockCache) UpdateCredential(credInfo *internalpb.CredentialInfo) { _m.Called(credInfo) diff --git a/internal/rootcoord/meta_table_test.go b/internal/rootcoord/meta_table_test.go index 67a3e7d8f9d68..fe9e92e499bc2 100644 --- a/internal/rootcoord/meta_table_test.go +++ b/internal/rootcoord/meta_table_test.go @@ -548,7 +548,7 @@ func TestMetaTable_GetCollectionByName(t *testing.T) { }, }, dbName2Meta: map[string]*model.Database{ - util.DefaultDBName: model.NewDefaultDatabase(), + util.DefaultDBName: model.NewDefaultDatabase(nil), }, } ctx := context.Background() @@ -569,7 +569,7 @@ func TestMetaTable_GetCollectionByName(t *testing.T) { }, }, dbName2Meta: map[string]*model.Database{ - util.DefaultDBName: model.NewDefaultDatabase(), + util.DefaultDBName: model.NewDefaultDatabase(nil), }, } meta.aliases.insert(util.DefaultDBName, "alias", 100) @@ -596,7 +596,7 @@ func TestMetaTable_GetCollectionByName(t *testing.T) { }, }, dbName2Meta: map[string]*model.Database{ - util.DefaultDBName: model.NewDefaultDatabase(), + util.DefaultDBName: model.NewDefaultDatabase(nil), }, } meta.names.insert(util.DefaultDBName, "name", 100) @@ -687,7 +687,7 @@ func TestMetaTable_GetCollectionByName(t *testing.T) { ctx := context.Background() meta := &MetaTable{ dbName2Meta: map[string]*model.Database{ - util.DefaultDBName: model.NewDefaultDatabase(), + util.DefaultDBName: model.NewDefaultDatabase(nil), }, names: newNameDb(), aliases: newNameDb(), @@ -1911,7 +1911,7 @@ func TestMetaTable_EmtpyDatabaseName(t *testing.T) { 1: {CollectionID: 1}, }, dbName2Meta: map[string]*model.Database{ - util.DefaultDBName: model.NewDefaultDatabase(), + util.DefaultDBName: model.NewDefaultDatabase(nil), }, }