fix: Fixes #153. Fixed CompleteMultipartUpload invalid ETag error case, fixed UploadPart xattr.Set error

This commit is contained in:
jonaustin09
2023-07-28 18:20:07 +04:00
parent bf33b9f5a2
commit 898c3efaa0
3 changed files with 34 additions and 5 deletions
+25 -1
View File
@@ -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,
},
},
},