Fix index tests

This commit is contained in:
Jake Barnby
2025-07-22 14:14:08 +12:00
parent 6da637b8b5
commit f33ed64f6a
2 changed files with 8 additions and 8 deletions
@@ -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',