Skip to content

Commit

Permalink
chore(Storage): fix risky test Requester Pays Test (#7207)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwarajanand authored Apr 8, 2024
1 parent 8dffb6b commit fc09005
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Storage/tests/System/RequesterPaysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,24 +374,29 @@ public function testUploadMethodsWithoutUserProject(callable $call)
public function testUploadMethodsWithUserProject(callable $call)
{
$bucket = self::$requesterClient->bucket(self::$bucketName, true);
$call($bucket);
$objectName = $call($bucket);
$this->assertTrue($bucket->object($objectName)->exists());
}

public function uploadMethods()
{
return [
'resumable-upload' => [
function (Bucket $bucket) {
$name = uniqid(self::TESTING_PREFIX);
$bucket->getResumableUploader(self::$content, [
'name' => uniqid(self::TESTING_PREFIX)
'name' => $name
])->upload();
return $name;
},
],
'streamable-upload' => [
function (Bucket $bucket) {
$name = uniqid(self::TESTING_PREFIX);
$bucket->getStreamableUploader(self::$content, [
'name' => uniqid(self::TESTING_PREFIX)
'name' => $name
])->upload();
return $name;
},
],
];
Expand Down

0 comments on commit fc09005

Please sign in to comment.