fix|update: database tests for new error messages.

This commit is contained in:
Darshan
2025-04-26 16:07:32 +05:30
parent 4f1f9bb4a2
commit 21715448ac
2 changed files with 3 additions and 3 deletions
@@ -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);
@@ -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