From 21715448ac04b154df005e79135cb2f6ee6fdd33 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 26 Apr 2025 16:07:32 +0530 Subject: [PATCH] fix|update: database tests for new error messages. --- tests/e2e/Services/Databases/DatabasesBase.php | 4 ++-- tests/e2e/Services/Databases/DatabasesCustomClientTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 0c7e1d386e..989d1217d3 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1373,7 +1373,7 @@ trait DatabasesBase ]); $this->assertEquals(400, $unknown['headers']['status-code']); - $this->assertEquals('Unknown attribute: Unknown. Verify the attribute name or create the attribute.', $unknown['body']['message']); + $this->assertEquals('Unknown column: Unknown. Verify the column name or create the column.', $unknown['body']['message']); $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -2671,7 +2671,7 @@ trait DatabasesBase $this->assertEquals(400, $enumDefault['headers']['status-code']); $this->assertEquals(400, $enumDefaultStrict['headers']['status-code']); $this->assertEquals('Minimum value must be lesser than maximum value', $invalidRange['body']['message']); - $this->assertEquals('Cannot set default value for array attributes', $defaultArray['body']['message']); + $this->assertEquals('Cannot set default value for array columns', $defaultArray['body']['message']); $this->assertEquals(400, $datetimeDefault['headers']['status-code']); // wait for worker to add attributes sleep(3); diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index 8484996058..d4a8c87868 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -472,7 +472,7 @@ class DatabasesCustomClientTest extends Scope \sleep(2); $this->assertEquals(409, $relation['body']['code']); - $this->assertEquals('Creating more than one "manyToMany" relationship on the same collection is currently not permitted.', $relation['body']['message']); + $this->assertEquals('Creating more than one "manyToMany" relationship on the same table is currently not permitted.', $relation['body']['message']); } public function testUpdateWithoutRelationPermission(): void