Compare commits

...
Author SHA1 Message Date
fogelito 7f826ef866 Add rerun 2025-02-05 09:11:42 +02:00
fogelito 19e8cded14 Add debug 2025-02-05 08:56:33 +02:00
fogelito 535afc4b73 Use Async trait 2025-02-04 20:32:52 +02:00
2 changed files with 22 additions and 0 deletions
+5
View File
@@ -49,6 +49,11 @@ trait ProjectCustom
'url' => 'https://appwrite.io',
]);
if($project['headers']['status-code'] != 201){
var_dump($project['headers']['status-code']);
var_dump($project);
}
$this->assertEquals(201, $project['headers']['status-code']);
$this->assertNotEmpty($project['body']);
@@ -2,6 +2,7 @@
namespace Tests\E2E\Services\Databases;
use Appwrite\Tests\Async;
use Tests\E2E\Client;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
@@ -13,12 +14,27 @@ use Utopia\Database\Validator\Authorization;
class DatabasesPermissionsGuestTest extends Scope
{
use Async;
use ProjectCustom;
use SideClient;
use DatabasesPermissionsScope;
public function createCollection(): array
{
// $this->assertEventually(function () use (&$database) {
// $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([
// 'content-type' => 'application/json',
// 'x-appwrite-project' => $this->getProject()['$id'],
// 'x-appwrite-key' => $this->getProject()['apiKey']
// ]), [
// 'databaseId' => ID::unique(),
// 'name' => 'InvalidDocumentDatabase',
// ]);
//
// $this->assertEquals(201, $database['headers']['status-code']);
// }, 50000, 500);
$database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
@@ -27,6 +43,7 @@ class DatabasesPermissionsGuestTest extends Scope
'databaseId' => ID::unique(),
'name' => 'InvalidDocumentDatabase',
]);
$this->assertEquals(201, $database['headers']['status-code']);
$this->assertEquals('InvalidDocumentDatabase', $database['body']['name']);