Skip to content

Commit

Permalink
fix: added softDeletePolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
thiyaguk09 committed Feb 24, 2025
1 parent f50acac commit 4ef3f1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion storage/test/storageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ public function testCreateBucketHnsEnabled()
$output
);
$this->assertTrue($info['hierarchicalNamespace']['enabled']);
$this->runFunctionSnippet('delete_bucket', [$bucketName]);
}

public function testObjectCsekToCmek()
Expand Down Expand Up @@ -948,7 +949,11 @@ public function testGetBucketWithAutoclass()
public function testGetRestoreSoftDeletedBucket()
{
$bucketName = sprintf('test-soft-deleted-bucket-%s-%s', time(), rand());
$bucket = self::$storage->createBucket($bucketName);
$bucket = self::$storage->createBucket($bucketName, [
'softDeletePolicy' => [
'retentionDuration' => 604800,
],
]);

$this->assertTrue($bucket->exists());
$generation = $bucket->info()['generation'];
Expand Down Expand Up @@ -983,6 +988,7 @@ public function testGetRestoreSoftDeletedBucket()
),
$output
);
$this->runFunctionSnippet('delete_bucket', [$bucketName]);
}

public function testSetBucketWithAutoclass()
Expand Down

0 comments on commit 4ef3f1f

Please sign in to comment.