correct the behavior of create duplicate rg (#23963)

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
pull/23961/head
wei liu 2023-05-09 14:06:40 +08:00 committed by GitHub
parent 4d248faa99
commit fb6e4ceee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ func (rm *ResourceManager) AddResourceGroup(rgName string) error {
}
if rm.groups[rgName] != nil {
return nil
return ErrRGAlreadyExist
}
if len(rm.groups) >= 1024 {

View File

@ -67,7 +67,7 @@ func (suite *ResourceManagerSuite) TestManipulateResourceGroup() {
// test add duplicate rg
err = suite.manager.AddResourceGroup("rg1")
suite.NoError(err)
suite.Error(err)
// test delete rg
err = suite.manager.RemoveResourceGroup("rg1")
suite.NoError(err)