@ -111,7 +111,7 @@ func testObjectAbortMultipartUpload(obj ObjectLayer, instanceType string, t Test
uploadID string
uploadID string
expectedErrType error
expectedErrType error
} {
} {
{ "--" , object , uploadID , BucketNameInvali d { } } ,
{ "--" , object , uploadID , BucketNotFoun d { } } ,
{ bucket , "\\" , uploadID , ObjectNameInvalid { } } ,
{ bucket , "\\" , uploadID , ObjectNameInvalid { } } ,
{ "foo" , object , uploadID , BucketNotFound { } } ,
{ "foo" , object , uploadID , BucketNotFound { } } ,
{ bucket , object , "foo-foo" , InvalidUploadID { } } ,
{ bucket , object , "foo-foo" , InvalidUploadID { } } ,
@ -293,11 +293,11 @@ func testObjectAPIPutObjectPart(obj ObjectLayer, instanceType string, t TestErrH
} {
} {
// Test case 1-4.
// Test case 1-4.
// Cases with invalid bucket name.
// Cases with invalid bucket name.
{ ".test" , "obj" , "" , 1 , "" , "" , "" , 0 , false , "" , fmt . Errorf ( "%s" , "Bucket name invali d: .test" ) } ,
{ ".test" , "obj" , "" , 1 , "" , "" , "" , 0 , false , "" , fmt . Errorf ( "%s" , "Bucket not foun d: .test" ) } ,
{ "------" , "obj" , "" , 1 , "" , "" , "" , 0 , false , "" , fmt . Errorf ( "%s" , "Bucket name invali d: ------" ) } ,
{ "------" , "obj" , "" , 1 , "" , "" , "" , 0 , false , "" , fmt . Errorf ( "%s" , "Bucket not foun d: ------" ) } ,
{ "$this-is-not-valid-too" , "obj" , "" , 1 , "" , "" , "" , 0 , false , "" ,
{ "$this-is-not-valid-too" , "obj" , "" , 1 , "" , "" , "" , 0 , false , "" ,
fmt . Errorf ( "%s" , "Bucket name invali d: $this-is-not-valid-too" ) } ,
fmt . Errorf ( "%s" , "Bucket not foun d: $this-is-not-valid-too" ) } ,
{ "a" , "obj" , "" , 1 , "" , "" , "" , 0 , false , "" , fmt . Errorf ( "%s" , "Bucket name invali d: a" ) } ,
{ "a" , "obj" , "" , 1 , "" , "" , "" , 0 , false , "" , fmt . Errorf ( "%s" , "Bucket not foun d: a" ) } ,
// Test case - 5.
// Test case - 5.
// Case with invalid object names.
// Case with invalid object names.
{ bucket , "" , "" , 1 , "" , "" , "" , 0 , false , "" , fmt . Errorf ( "%s" , "Object name invalid: minio-bucket#" ) } ,
{ bucket , "" , "" , 1 , "" , "" , "" , 0 , false , "" , fmt . Errorf ( "%s" , "Object name invalid: minio-bucket#" ) } ,
@ -1103,10 +1103,10 @@ func testListMultipartUploads(obj ObjectLayer, instanceType string, t TestErrHan
shouldPass bool
shouldPass bool
} {
} {
// Test cases with invalid bucket names ( Test number 1-4 ).
// Test cases with invalid bucket names ( Test number 1-4 ).
{ ".test" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNameInvali d { Bucket : ".test" } , false } ,
{ ".test" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNotFoun d { Bucket : ".test" } , false } ,
{ "Test" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNameInvali d { Bucket : "Test" } , false } ,
{ "Test" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNotFoun d { Bucket : "Test" } , false } ,
{ "---" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNameInvali d { Bucket : "---" } , false } ,
{ "---" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNotFoun d { Bucket : "---" } , false } ,
{ "ad" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNameInvali d { Bucket : "ad" } , false } ,
{ "ad" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNotFoun d { Bucket : "ad" } , false } ,
// Valid bucket names, but they donot exist (Test number 5-7).
// Valid bucket names, but they donot exist (Test number 5-7).
{ "volatile-bucket-1" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNotFound { Bucket : "volatile-bucket-1" } , false } ,
{ "volatile-bucket-1" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNotFound { Bucket : "volatile-bucket-1" } , false } ,
{ "volatile-bucket-2" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNotFound { Bucket : "volatile-bucket-2" } , false } ,
{ "volatile-bucket-2" , "" , "" , "" , "" , 0 , ListMultipartsInfo { } , BucketNotFound { Bucket : "volatile-bucket-2" } , false } ,
@ -1404,10 +1404,10 @@ func testListObjectPartsDiskNotFound(obj ObjectLayer, instanceType string, disks
shouldPass bool
shouldPass bool
} {
} {
// Test cases with invalid bucket names (Test number 1-4).
// Test cases with invalid bucket names (Test number 1-4).
{ ".test" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNameInvali d { Bucket : ".test" } , false } ,
{ ".test" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFoun d { Bucket : ".test" } , false } ,
{ "Test" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNameInvali d { Bucket : "Test" } , false } ,
{ "Test" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFoun d { Bucket : "Test" } , false } ,
{ "---" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNameInvali d { Bucket : "---" } , false } ,
{ "---" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFoun d { Bucket : "---" } , false } ,
{ "ad" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNameInvali d { Bucket : "ad" } , false } ,
{ "ad" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFoun d { Bucket : "ad" } , false } ,
// Test cases for listing uploadID with single part.
// Test cases for listing uploadID with single part.
// Valid bucket names, but they donot exist (Test number 5-7).
// Valid bucket names, but they donot exist (Test number 5-7).
{ "volatile-bucket-1" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFound { Bucket : "volatile-bucket-1" } , false } ,
{ "volatile-bucket-1" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFound { Bucket : "volatile-bucket-1" } , false } ,
@ -1642,10 +1642,10 @@ func testListObjectParts(obj ObjectLayer, instanceType string, t TestErrHandler)
shouldPass bool
shouldPass bool
} {
} {
// Test cases with invalid bucket names (Test number 1-4).
// Test cases with invalid bucket names (Test number 1-4).
{ ".test" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNameInvali d { Bucket : ".test" } , false } ,
{ ".test" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFoun d { Bucket : ".test" } , false } ,
{ "Test" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNameInvali d { Bucket : "Test" } , false } ,
{ "Test" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFoun d { Bucket : "Test" } , false } ,
{ "---" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNameInvali d { Bucket : "---" } , false } ,
{ "---" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFoun d { Bucket : "---" } , false } ,
{ "ad" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNameInvali d { Bucket : "ad" } , false } ,
{ "ad" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFoun d { Bucket : "ad" } , false } ,
// Test cases for listing uploadID with single part.
// Test cases for listing uploadID with single part.
// Valid bucket names, but they donot exist (Test number 5-7).
// Valid bucket names, but they donot exist (Test number 5-7).
{ "volatile-bucket-1" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFound { Bucket : "volatile-bucket-1" } , false } ,
{ "volatile-bucket-1" , "" , "" , 0 , 0 , ListPartsInfo { } , BucketNotFound { Bucket : "volatile-bucket-1" } , false } ,
@ -1863,10 +1863,10 @@ func testObjectCompleteMultipartUpload(obj ObjectLayer, instanceType string, t T
shouldPass bool
shouldPass bool
} {
} {
// Test cases with invalid bucket names (Test number 1-4).
// Test cases with invalid bucket names (Test number 1-4).
{ ".test" , "" , "" , [ ] CompletePart { } , "" , BucketNameInvali d { Bucket : ".test" } , false } ,
{ ".test" , "" , "" , [ ] CompletePart { } , "" , BucketNotFoun d { Bucket : ".test" } , false } ,
{ "Test" , "" , "" , [ ] CompletePart { } , "" , BucketNameInvali d { Bucket : "Test" } , false } ,
{ "Test" , "" , "" , [ ] CompletePart { } , "" , BucketNotFoun d { Bucket : "Test" } , false } ,
{ "---" , "" , "" , [ ] CompletePart { } , "" , BucketNameInvali d { Bucket : "---" } , false } ,
{ "---" , "" , "" , [ ] CompletePart { } , "" , BucketNotFoun d { Bucket : "---" } , false } ,
{ "ad" , "" , "" , [ ] CompletePart { } , "" , BucketNameInvali d { Bucket : "ad" } , false } ,
{ "ad" , "" , "" , [ ] CompletePart { } , "" , BucketNotFoun d { Bucket : "ad" } , false } ,
// Test cases for listing uploadID with single part.
// Test cases for listing uploadID with single part.
// Valid bucket names, but they donot exist (Test number 5-7).
// Valid bucket names, but they donot exist (Test number 5-7).
{ "volatile-bucket-1" , "" , "" , [ ] CompletePart { } , "" , BucketNotFound { Bucket : "volatile-bucket-1" } , false } ,
{ "volatile-bucket-1" , "" , "" , [ ] CompletePart { } , "" , BucketNotFound { Bucket : "volatile-bucket-1" } , false } ,