From 8627251ae4ec4000079e98b89dc4c19507f19995 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 6 Feb 2026 20:59:16 +1300 Subject: [PATCH] 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 --- tests/e2e/Services/Webhooks/WebhooksBase.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index b2822bc246..ba186101ca 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -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 */