mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
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:
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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user