mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
updated tests condition
This commit is contained in:
@@ -493,9 +493,17 @@ trait DatabasesBase
|
||||
|
||||
$this->assertEquals(400, $attribute['headers']['status-code']);
|
||||
|
||||
$maxLength = $this->isMongoDB() ? 1024 : 768;
|
||||
|
||||
$this->assertStringContainsString('Index length is longer than the maximum: '.$maxLength, $attribute['body']['message']);
|
||||
$message = $attribute['body']['message'];
|
||||
if ($this->MongoDB()) {
|
||||
$this->assertStringContainsString('Index length is longer than the maximum: 1024', $message);
|
||||
} else {
|
||||
// length depends on the shared table
|
||||
$this->assertTrue(
|
||||
str_contains($message, 'Index length is longer than the maximum: 767') ||
|
||||
str_contains($message, 'Index length is longer than the maximum: 768'),
|
||||
"Message does not contain expected max length"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function testUpdateAttributeEnum(): void
|
||||
|
||||
@@ -8663,7 +8663,7 @@ trait DatabasesBase
|
||||
'$id' => 'row1',
|
||||
'name' => 'Test Row 1',
|
||||
'pointAttr' => [6.0, 6.0],
|
||||
'lineAttr' => [[1.0, 1.0], [2.0, 2.0]],
|
||||
'lineAttr' => [[1.0, 1.0], [1.1,1.1] , [2.0, 2.0]],
|
||||
'polyAttr' => [[[0.0, 0.0], [10.0, 0.0], [10.0, 10.0], [0.0, 10.0], [0.0, 0.0]]]
|
||||
],
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user