From f69c95e11920e2edc8010e462a93b20a136e015b Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Wed, 5 May 2021 10:32:20 +0300 Subject: [PATCH] Fixed tests --- app/init.php | 2 +- tests/e2e/Services/Webhooks/WebhooksBase.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/init.php b/app/init.php index 2990fc6276..7a163a39cb 100644 --- a/app/init.php +++ b/app/init.php @@ -552,7 +552,7 @@ App::setResource('dbForConsole', function($register) { $cache = new Cache(new RedisCache($register->get('cache'))); $database = new Database2(new MariaDB($register->get('db')), $cache); - $database->setNamespace('project_console'); + $database->setNamespace('project_console_internal'); return $database; }, ['register']); diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index 5dc6cfafe2..a687e2d445 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -228,7 +228,8 @@ trait WebhooksBase $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); - $this->assertIsArray($webhook['data']['$permissions']); + $this->assertIsArray($webhook['data']['$read']); + $this->assertIsArray($webhook['data']['$write']); $this->assertEquals($webhook['data']['name'], 'logo.png'); $this->assertIsInt($webhook['data']['dateCreated'], 'logo.png'); $this->assertNotEmpty($webhook['data']['signature']);