Adding tests for put bucket errors, fixed mismatching error

This commit is contained in:
Frederick F. Kautz IV
2015-04-03 18:37:36 -07:00
parent a6fc618f91
commit db1e6e5988
2 changed files with 34 additions and 7 deletions

View File

@@ -141,16 +141,11 @@ func (server *minioAPI) putBucketHandler(w http.ResponseWriter, req *http.Reques
}
case drivers.BucketExists:
{
writeErrorResponse(w, req, InvalidBucketName, acceptsContentType, req.URL.Path)
}
case drivers.ImplementationError:
{
log.Error.Println(err)
writeErrorResponse(w, req, InternalError, acceptsContentType, req.URL.Path)
writeErrorResponse(w, req, BucketAlreadyExists, acceptsContentType, req.URL.Path)
}
default:
{
log.Error.Println(err)
log.Error.Println(iodine.New(err, nil))
writeErrorResponse(w, req, InternalError, acceptsContentType, req.URL.Path)
}
}