mirror of
https://github.com/minio/minio.git
synced 2025-11-11 06:20:14 -05:00
Mint - Add AWS SDK Go tests (#12097)
* Add aws-sdk-go tests: extend testListObjectVersionsSimple with error cases * Add aws-sdk-go tests: extend testListMultipartUploads with error cases Co-authored-by: Andre Bruch <ab@andrebruch.com> Signed-off-by: Harshavardhana <harsha@minio.io>
This commit is contained in:
committed by
Harshavardhana
parent
445d080826
commit
046e8fd17e
@@ -951,6 +951,29 @@ func testListMultipartUploads(s3Client *s3.S3) {
|
||||
return
|
||||
}
|
||||
|
||||
// Error cases
|
||||
|
||||
// MaxParts < 0
|
||||
lpInput := &s3.ListPartsInput{
|
||||
Bucket: aws.String(bucket),
|
||||
Key: aws.String(object),
|
||||
UploadId: multipartUpload.UploadId,
|
||||
MaxParts: aws.Int64(-1),
|
||||
}
|
||||
listParts, err = s3Client.ListParts(lpInput)
|
||||
if err == nil {
|
||||
failureLog(function, args, startTime, "", "AWS SDK Go ListPartsInput API (MaxParts < 0) failed for", err).Fatal()
|
||||
return
|
||||
}
|
||||
|
||||
// PartNumberMarker < 0
|
||||
lpInput.PartNumberMarker = aws.Int64(-1)
|
||||
listParts, err = s3Client.ListParts(lpInput)
|
||||
if err == nil {
|
||||
failureLog(function, args, startTime, "", "AWS SDK Go ListPartsInput API (PartNumberMarker < 0) failed for", err).Fatal()
|
||||
return
|
||||
}
|
||||
|
||||
successLogger(function, args, startTime).Info()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user