From 19e8cded1477c3d6257cff0333c2cfb77db4be1d Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 5 Feb 2025 08:56:33 +0200 Subject: [PATCH] Add debug --- tests/e2e/Scopes/ProjectCustom.php | 4 +++ .../DatabasesPermissionsGuestTest.php | 32 ++++++++++++------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 7f84ace6f2..500bd11b7f 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -49,6 +49,10 @@ trait ProjectCustom 'url' => 'https://appwrite.io', ]); + if($project['headers']['status-code'] != 201){ + var_dump($project); + } + $this->assertEquals(201, $project['headers']['status-code']); $this->assertNotEmpty($project['body']); diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php index 06bb93f7b7..357ca6c113 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php @@ -22,19 +22,29 @@ class DatabasesPermissionsGuestTest extends Scope 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->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); - $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'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'databaseId' => ID::unique(), + 'name' => 'InvalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('InvalidDocumentDatabase', $database['body']['name']); $databaseId = $database['body']['$id'];