fix: resolve test failures in Databases, Functions, Messaging, Storage

- Fix typo CLient -> Client in DatabasesBase.php:4568
- Fix typo CLient -> Client in StorageCustomClientTest.php:428
- Fix cleanupFunction() call with extra parameter in FunctionsScheduleTest.php:175
- Increase message scheduling test timeouts from 30s to 180s for CI stability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-02-06 04:03:40 +13:00
co-authored by Claude Opus 4.5
parent 4631a2a75f
commit 2c5dee0fdd
4 changed files with 7 additions and 5 deletions
@@ -4565,7 +4565,7 @@ trait DatabasesBase
$this->assertEquals(401, $documentsUser2['headers']['status-code']);
// Enable document permissions
$collection = $this->client->call(CLient::METHOD_PUT, $this->getContainerUrl($databaseId, $collectionId), [
$collection = $this->client->call(Client::METHOD_PUT, $this->getContainerUrl($databaseId, $collectionId), [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
@@ -172,7 +172,7 @@ class FunctionsScheduleTest extends Scope
]);
$this->assertEquals(400, $execution['headers']['status-code']);
$this->cleanupFunction($functionId, $executionId);
$this->cleanupFunction($functionId);
}
public function testDeleteScheduledExecution()
@@ -1182,6 +1182,7 @@ trait MessagingBase
$this->assertEquals(MessageStatus::SCHEDULED, $message['body']['status']);
$messageId = $message['body']['$id'];
// Use longer timeout for CI stability as scheduler interval may vary
$this->assertEventually(function () use ($messageId) {
$message = $this->client->call(Client::METHOD_GET, '/messaging/messages/' . $messageId, [
'content-type' => 'application/json',
@@ -1191,7 +1192,7 @@ trait MessagingBase
$this->assertEquals(200, $message['headers']['status-code']);
$this->assertEquals(MessageStatus::FAILED, $message['body']['status']);
}, 30000, 1000);
}, 180000, 1000);
}
public function testUpdateScheduledAt(): void
@@ -1253,6 +1254,7 @@ trait MessagingBase
$this->assertEquals(MessageStatus::SCHEDULED, $message['body']['status']);
// Wait for message to be processed and fail
// Use longer timeout for CI stability as scheduler interval may vary
$this->assertEventually(function () use ($messageId) {
$message = $this->client->call(Client::METHOD_GET, '/messaging/messages/' . $messageId, [
'content-type' => 'application/json',
@@ -1262,7 +1264,7 @@ trait MessagingBase
$this->assertEquals(200, $message['headers']['status-code']);
$this->assertEquals(MessageStatus::FAILED, $message['body']['status']);
}, 30000, 1000);
}, 180000, 1000);
}
public function testSendEmail()
@@ -425,7 +425,7 @@ class StorageCustomClientTest extends Scope
'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'permissions.png'),
]);
$this->client->call(CLient::METHOD_PUT, '/storage/buckets/' . $bucketId . '/files/' . $fileId, [
$this->client->call(Client::METHOD_PUT, '/storage/buckets/' . $bucketId . '/files/' . $fileId, [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], [