More groups tests (#1923)

This commit is contained in:
adfost
2022-05-02 09:25:21 -07:00
committed by GitHub
parent 07d75e19d5
commit 224e8d4bba
2 changed files with 211 additions and 16 deletions

View File

@@ -204,9 +204,13 @@ func getRemoveGroupResponse(session *models.Principal, params groupApi.RemoveGro
// createad a MinIO Admin Client interface implementation
// defining the client to be used
adminClient := AdminClient{Client: mAdmin}
if err := removeGroup(ctx, adminClient, params.Name); err != nil {
return ErrorWithContext(ctx, err)
minioError := madmin.ToErrorResponse(err)
err2 := ErrorWithContext(ctx, err)
if minioError.Code == "XMinioAdminNoSuchGroup" {
err2.Code = 404
}
return err2
}
return nil
}