mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Adding detailed comments for server_xl_test. (#2011)
This commit is contained in:
parent
4db2b03312
commit
76f6533f8d
@ -1726,7 +1726,7 @@ func testObjectCompleteMultipartUpload(obj ObjectLayer, instanceType string, t *
|
||||
uploadIDs = append(uploadIDs, uploadID)
|
||||
// Parts with size greater than 5 MB.
|
||||
// Generating a 6MB byte array.
|
||||
validPart := bytes.Repeat([]byte("0123456789abcdef"), 1024*1024)
|
||||
validPart := bytes.Repeat([]byte("abcdef"), 1024*1024)
|
||||
validPartMD5 := findMD5(validPart)
|
||||
// Create multipart parts.
|
||||
// Need parts to be uploaded before CompleteMultiPartUpload can be called tested.
|
||||
|
@ -120,7 +120,7 @@ func testObjectAPIPutObject(obj ObjectLayer, instanceType string, t *testing.T)
|
||||
}
|
||||
|
||||
// Wrapper for calling PutObject tests for both XL multiple disks case
|
||||
// when quorum is not availabel.
|
||||
// when quorum is not available.
|
||||
func TestObjectAPIPutObjectDiskNotFound(t *testing.T) {
|
||||
ExecObjectLayerDiskNotFoundTest(t, testObjectAPIPutObjectDiskNotFOund)
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -439,6 +439,60 @@ func getDeleteBucketURL(endPoint, bucketName string) string {
|
||||
|
||||
}
|
||||
|
||||
// return URL for listing the bucket.
|
||||
func getListObjectsURL(endPoint, bucketName string, maxKeys string) string {
|
||||
queryValue := url.Values{}
|
||||
if maxKeys != "" {
|
||||
queryValue.Set("max-keys", maxKeys)
|
||||
}
|
||||
return makeTestTargetURL(endPoint, bucketName, "", queryValue)
|
||||
}
|
||||
|
||||
// return URL for a new multipart upload.
|
||||
func getNewMultipartURL(endPoint, bucketName, objectName string) string {
|
||||
queryValue := url.Values{}
|
||||
queryValue.Set("uploads", "")
|
||||
return makeTestTargetURL(endPoint, bucketName, objectName, queryValue)
|
||||
}
|
||||
|
||||
// return URL for a new multipart upload.
|
||||
func getPartUploadURL(endPoint, bucketName, objectName, uploadID, partNumber string) string {
|
||||
queryValues := url.Values{}
|
||||
queryValues.Set("uploadId", uploadID)
|
||||
queryValues.Set("partNumber", partNumber)
|
||||
return makeTestTargetURL(endPoint, bucketName, objectName, queryValues)
|
||||
}
|
||||
|
||||
// return URL for aborting multipart upload.
|
||||
func getAbortMultipartUploadURL(endPoint, bucketName, objectName, uploadID string) string {
|
||||
queryValue := url.Values{}
|
||||
queryValue.Set("uploadId", uploadID)
|
||||
return makeTestTargetURL(endPoint, bucketName, objectName, queryValue)
|
||||
}
|
||||
|
||||
// return URL for a new multipart upload.
|
||||
func getListMultipartURL(endPoint, bucketName string) string {
|
||||
queryValue := url.Values{}
|
||||
queryValue.Set("uploads", "")
|
||||
return makeTestTargetURL(endPoint, bucketName, "", queryValue)
|
||||
}
|
||||
|
||||
// return URL for a new multipart upload.
|
||||
func getListMultipartURLWithParams(endPoint, bucketName, objectName, uploadID, maxParts string) string {
|
||||
queryValues := url.Values{}
|
||||
queryValues.Set("uploadId", uploadID)
|
||||
queryValues.Set("max-parts", maxParts)
|
||||
return makeTestTargetURL(endPoint, bucketName, objectName, queryValues)
|
||||
}
|
||||
|
||||
// return URL for completing multipart upload.
|
||||
// complete multipart upload request is sent after all parts are uploaded.
|
||||
func getCompleteMultipartUploadURL(endPoint, bucketName, objectName, uploadID string) string {
|
||||
queryValue := url.Values{}
|
||||
queryValue.Set("uploadId", uploadID)
|
||||
return makeTestTargetURL(endPoint, bucketName, objectName, queryValue)
|
||||
}
|
||||
|
||||
// returns temp root directory. `
|
||||
func getTestRoot() (string, error) {
|
||||
return ioutil.TempDir(os.TempDir(), "api-")
|
||||
|
Loading…
Reference in New Issue
Block a user