Tests for delete bucket and config functions (#1976)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2022-05-11 09:39:43 -07:00
committed by GitHub
parent 94b4725e24
commit f409049a51
6 changed files with 206 additions and 33 deletions

View File

@@ -632,7 +632,12 @@ func getDeleteBucketResponse(session *models.Principal, params bucketApi.DeleteB
// defining the client to be used
minioClient := minioClient{client: mClient}
if err := removeBucket(minioClient, bucketName); err != nil {
return ErrorWithContext(ctx, err)
resp := ErrorWithContext(ctx, err)
errResp := minio.ToErrorResponse(err)
if errResp.Code == "NoSuchBucket" {
resp.Code = 404
}
return resp
}
return nil
}