Add tests for abortMultipartUpload, listobjectparts, listmultipartuploads

This commit is contained in:
Harshavardhana
2015-05-14 17:07:30 -07:00
parent 5f381a8bee
commit dba7c94571
3 changed files with 287 additions and 13 deletions
+2 -6
View File
@@ -70,10 +70,6 @@ func (server *minioAPI) isValidOp(w http.ResponseWriter, req *http.Request, acce
//
func (server *minioAPI) listMultipartUploadsHandler(w http.ResponseWriter, req *http.Request) {
acceptsContentType := getContentType(req)
// verify if bucket allows this operation
if !server.isValidOp(w, req, acceptsContentType) {
return
}
resources := getBucketMultipartResources(req.URL.Query())
if resources.MaxUploads == 0 {
@@ -98,9 +94,9 @@ func (server *minioAPI) listMultipartUploadsHandler(w http.ResponseWriter, req *
// write body
w.Write(encodedSuccessResponse)
}
case drivers.ObjectNotFound:
case drivers.BucketNotFound:
{
writeErrorResponse(w, req, NoSuchKey, acceptsContentType, req.URL.Path)
writeErrorResponse(w, req, NoSuchBucket, acceptsContentType, req.URL.Path)
}
default:
{