mirror of
https://github.com/versity/versitygw.git
synced 2026-09-19 22:44:28 +00:00
fix: Fixes #153. Fixed CompleteMultipartUpload invalid ETag error case, fixed UploadPart xattr.Set error
This commit is contained in:
+25
-1
@@ -777,6 +777,30 @@ func TestIncorrectMultiParts(s *S3Conf) {
|
||||
return
|
||||
}
|
||||
|
||||
ctx, cancel = context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err = s3client.CompleteMultipartUpload(ctx, &s3.CompleteMultipartUploadInput{
|
||||
Bucket: &bucket,
|
||||
Key: &obj,
|
||||
UploadId: mpu.UploadId,
|
||||
MultipartUpload: &types.CompletedMultipartUpload{
|
||||
Parts: []types.CompletedPart{
|
||||
{
|
||||
ETag: mp2.ETag,
|
||||
PartNumber: 96,
|
||||
},
|
||||
{
|
||||
ETag: mp1.ETag,
|
||||
PartNumber: 99,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
cancel()
|
||||
if err == nil {
|
||||
failF("%v: complete multipart expected err", testname)
|
||||
return
|
||||
}
|
||||
|
||||
badEtag := "bogusEtagValue"
|
||||
|
||||
ctx, cancel = context.WithTimeout(context.Background(), shortTimeout)
|
||||
@@ -792,7 +816,7 @@ func TestIncorrectMultiParts(s *S3Conf) {
|
||||
},
|
||||
{
|
||||
ETag: &badEtag,
|
||||
PartNumber: 99,
|
||||
PartNumber: 42,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user