From 0ca53304b7f82d3a95696d8eaae69eb9773b983e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 6 Sep 2025 00:10:00 +1200 Subject: [PATCH 1/3] Fix boundary inclusive contains on mysql --- tests/e2e/Services/Databases/Legacy/DatabasesBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index e461ae6621..618af29012 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -6769,7 +6769,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::contains('lineAttr', [[1.0, 1.0]])->toString()] + 'queries' => [Query::contains('lineAttr', [[1.1, 1.1]])->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(1, $response['body']['documents']); From 3f7d05ca8fede7903975c05a9257acf87bf44a42 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 6 Sep 2025 00:10:28 +1200 Subject: [PATCH 2/3] Remove invalid test for spatial order on MySQL --- .../e2e/Services/Databases/Legacy/DatabasesBase.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 618af29012..e5a775c304 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -7635,19 +7635,6 @@ trait DatabasesBase ]); $this->assertEquals(202, $retriedIndex['headers']['status-code']); - // Passing orders to spatial index should not throw error(in case of mariadb) - $ordersIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/indexes', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'key' => 'idx_required_point_with_orders', - 'type' => Database::INDEX_SPATIAL, - 'attributes' => ['pRequired'], - 'orders' => ['ASC'] - ]); - $this->assertEquals(202, $ordersIndex['headers']['status-code']); - // Cleanup $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ 'content-type' => 'application/json', From 489f8db376671449f29d02195ada5f0ec88a2200 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sat, 6 Sep 2025 00:13:48 +1200 Subject: [PATCH 3/3] Apply to TablesDB tests --- .../Services/Databases/TablesDB/DatabasesBase.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 3b220e192e..8b8d3d8050 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -8230,7 +8230,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::contains('lineAttr', [[1.0, 1.0]])->toString()] + 'queries' => [Query::contains('lineAttr', [[1.1, 1.1]])->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(1, $response['body']['rows']); @@ -8562,19 +8562,6 @@ trait DatabasesBase ]); $this->assertEquals(202, $retriedIndex['headers']['status-code']); - // Passing orders to spatial index should not throw error (in case of mariadb) - $ordersIndex = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]), [ - 'key' => 'idx_required_point_with_orders', - 'type' => Database::INDEX_SPATIAL, - 'columns' => ['pRequired'], - 'orders' => ['ASC'] - ]); - $this->assertEquals(202, $ordersIndex['headers']['status-code']); - // Cleanup $this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json',