Skip to content

Commit

Permalink
abortMultipart do not expect an error for non-existent
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Sep 29, 2023
1 parent 2da4123 commit a1b4fb2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ run/core/minio-dotnet/obj/*
run/core/minio-dotnet/out/*
run/core/minio-go/main.go
run/core/healthcheck/healthcheck
.idea/
.idea/
.phive/
.phplint.cache/
build/versioning/tests
tools/
21 changes: 10 additions & 11 deletions run/core/aws-sdk-php/quick-tests.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
#
# Mint, (C) 2017 Minio, Inc.
# Mint, (C) 2023 Minio, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -622,16 +622,15 @@ function testAbortMultipartUpload($s3Client, $params) {
throw new Exception('abortMultipartupload API failed for ' .
$bucket . '/' . $object);

//Run failure tests
$params = [
// Upload doesn't exist
'NoSuchUpload' => [
'Bucket' => $bucket,
'Key' => $object,
'UploadId' => 'non-existent',
],
];
runExceptionalTests($s3Client, 'abortMultipartUpload', 'getAwsErrorCode', $params);
$result = $s3Client->abortMultipartUpload([
'Bucket' => $bucket,
'Key' => $object,
'UploadId' => 'non-existent',
]);

if (getStatusCode($result) != HTTP_NOCONTENT)
throw new Exception('abortMultipartupload API failed for ' .
$bucket . '/' . $object);
}

/**
Expand Down

0 comments on commit a1b4fb2

Please sign in to comment.