From de88ec4065f02c66d348a1cdb7b80853a1b24b0f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 8 Dec 2025 20:30:37 +0530 Subject: [PATCH] updated missing skip metrics and tablesdb tests --- src/Appwrite/Platform/Workers/StatsUsage.php | 3 ++- tests/e2e/Services/Databases/TablesDB/DatabasesBase.php | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Appwrite/Platform/Workers/StatsUsage.php b/src/Appwrite/Platform/Workers/StatsUsage.php index 24e60a714e..09860520af 100644 --- a/src/Appwrite/Platform/Workers/StatsUsage.php +++ b/src/Appwrite/Platform/Workers/StatsUsage.php @@ -68,6 +68,7 @@ class StatsUsage extends Action METRIC_COLLECTIONS => true, METRIC_DOCUMENTS => true, METRIC_DATABASES_STORAGE => true, + METRIC_DATABASES_STORAGE_DOCUMENTSDB => true, ]; /** @@ -501,7 +502,7 @@ class StatsUsage extends Action foreach ($this->skipParentIdMetrics as $skipMetric) { $metricParts = explode('.', $stat->getAttribute('metric')); $metric = implode('.', in_array($metricParts[0], self::DATABASE_PREFIXES) ? array_slice($metricParts, 1) : $metricParts); - if (str_ends_with($metric, $metric)) { + if (str_ends_with($metric, $skipMetric)) { return; } } diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 2013e0a7a7..b992667134 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -1362,12 +1362,7 @@ trait DatabasesBase $this->assertEquals(400, $fulltextArray['headers']['status-code']); - // MongoDB only allows one fulltext index per collection, so it returns a different error - if ($this->isMongoDB()) { - $this->assertEquals('There is already a fulltext index in the collection', $fulltextArray['body']['message']); - } else { - $this->assertEquals('Creating indexes on array attributes is not currently supported.', $fulltextArray['body']['message']); - } + $this->assertEquals('Creating indexes on array attributes is not currently supported.', $fulltextArray['body']['message']); $actorsArray = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json',