fix: Make testDeleteStorageBucket self-sufficient

Update bucket name before deleting to ensure webhook data has
expected name, regardless of whether testUpdateStorageBucket ran.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-02-06 20:59:16 +13:00
co-authored by Claude Opus 4.5
parent 1f17dca7c9
commit 8627251ae4
@@ -1345,6 +1345,18 @@ trait WebhooksBase
// Set up an enabled storage bucket
$data = $this->setupStorageBucket();
$bucketId = $data['bucketId'];
// Update bucket name before deleting to make test self-sufficient
// (In parallel execution, testUpdateStorageBucket may not have run)
$this->client->call(Client::METHOD_PUT, '/storage/buckets/' . $bucketId, array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'name' => 'Test Bucket Updated',
'fileSecurity' => true,
]);
/**
* Test for SUCCESS
*/