mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix index tests
This commit is contained in:
@@ -1344,7 +1344,8 @@ trait DatabasesBase
|
||||
'attributes' => ['actors'],
|
||||
]);
|
||||
|
||||
$this->assertEquals(202, $actorsArray['headers']['status-code']);
|
||||
// Indexes on array attributes are disabled due to MySQL bug
|
||||
$this->assertEquals(400, $actorsArray['headers']['status-code']);
|
||||
|
||||
$twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1357,9 +1358,8 @@ trait DatabasesBase
|
||||
'orders' => ['DESC', 'DESC'],
|
||||
]);
|
||||
|
||||
$this->assertEquals(202, $twoLevelsArray['headers']['status-code']);
|
||||
$this->assertEquals('DESC', $twoLevelsArray['body']['orders'][0]);
|
||||
$this->assertEquals(null, $twoLevelsArray['body']['orders'][1]); // Overwrite by API (array)
|
||||
// Indexes on array attributes are disabled due to MySQL bug
|
||||
$this->assertEquals(400, $twoLevelsArray['headers']['status-code']);
|
||||
|
||||
$unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
||||
@@ -1344,7 +1344,8 @@ trait DatabasesBase
|
||||
'columns' => ['actors'],
|
||||
]);
|
||||
|
||||
$this->assertEquals(202, $actorsArray['headers']['status-code']);
|
||||
// Indexes on array attributes are disabled due to MySQL bug
|
||||
$this->assertEquals(400, $actorsArray['headers']['status-code']);
|
||||
|
||||
$twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1357,9 +1358,8 @@ trait DatabasesBase
|
||||
'orders' => ['DESC', 'DESC'],
|
||||
]);
|
||||
|
||||
$this->assertEquals(202, $twoLevelsArray['headers']['status-code']);
|
||||
$this->assertEquals('DESC', $twoLevelsArray['body']['orders'][0]);
|
||||
$this->assertEquals(null, $twoLevelsArray['body']['orders'][1]); // Overwrite by API (array)
|
||||
// Indexes on array attributes are disabled due to MySQL bug
|
||||
$this->assertEquals(400, $twoLevelsArray['headers']['status-code']);
|
||||
|
||||
$unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user