From a1b4fb2c255e6dcb846d2c9010372c84b69ae313 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 28 Sep 2023 16:29:32 -0700 Subject: [PATCH] abortMultipart do not expect an error for non-existent --- .gitignore | 6 +++++- run/core/aws-sdk-php/quick-tests.php | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 5c5bb096..a49736a7 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ \ No newline at end of file +.idea/ +.phive/ +.phplint.cache/ +build/versioning/tests +tools/ \ No newline at end of file diff --git a/run/core/aws-sdk-php/quick-tests.php b/run/core/aws-sdk-php/quick-tests.php index 806ab22f..99cd4871 100644 --- a/run/core/aws-sdk-php/quick-tests.php +++ b/run/core/aws-sdk-php/quick-tests.php @@ -1,6 +1,6 @@ [ - '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); } /**