diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 5cbf9b1b08..31f530bd75 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -77,7 +77,7 @@ abstract class Migration '1.4.10' => 'V19', '1.4.11' => 'V19', '1.4.12' => 'V19', - '1.4.13' => 'V19' + '1.4.13' => 'V19', '1.4.14' => 'V20' ]; diff --git a/src/Appwrite/Platform/Services/Tasks.php b/src/Appwrite/Platform/Services/Tasks.php index 4f4a196c9e..bd5f404da2 100644 --- a/src/Appwrite/Platform/Services/Tasks.php +++ b/src/Appwrite/Platform/Services/Tasks.php @@ -22,7 +22,6 @@ use Appwrite\Platform\Tasks\GetMigrationStats; use Appwrite\Platform\Tasks\PatchRecreateRepositoriesDocuments; use Appwrite\Platform\Tasks\CreateInfMetric; - class Tasks extends Service { public function __construct() diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php index 886d703241..c0369b6c9e 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php @@ -224,10 +224,12 @@ class DatabasesConsoleClientTest extends Scope ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(count($response['body']), 3); - $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['documentsTotal']); - $this->assertIsArray($response['body']['collectionsTotal']); + $this->assertEquals(5, count($response['body'])); + $this->assertEquals('24h', $response['body']['range']); + $this->assertIsNumeric($response['body']['documentsTotal']); + $this->assertIsNumeric($response['body']['collectionsTotal']); + $this->assertIsArray($response['body']['collections']); + $this->assertIsArray($response['body']['documents']); } @@ -269,9 +271,10 @@ class DatabasesConsoleClientTest extends Scope 'range' => '24h' ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(count($response['body']), 2); - $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['documentsTotal']); + $this->assertEquals(3, count($response['body'])); + $this->assertEquals('24h', $response['body']['range']); + $this->assertIsNumeric($response['body']['documentsTotal']); + $this->assertIsArray($response['body']['documents']); } /** diff --git a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php index 3dad6cb386..90252198dc 100644 --- a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php @@ -91,15 +91,23 @@ class FunctionsConsoleClientTest extends Scope 'range' => '24h' ]); - $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 8); - $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['deploymentsTotal']); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(15, count($response['body'])); + $this->assertEquals('24h', $response['body']['range']); + $this->assertIsNumeric($response['body']['deploymentsTotal']); + $this->assertIsNumeric($response['body']['deploymentsStorageTotal']); + $this->assertIsNumeric($response['body']['buildsTotal']); + $this->assertIsNumeric($response['body']['buildsStorageTotal']); + $this->assertIsNumeric($response['body']['buildsTimeTotal']); + $this->assertIsNumeric($response['body']['executionsTotal']); + $this->assertIsNumeric($response['body']['executionsTimeTotal']); + $this->assertIsArray($response['body']['deployments']); $this->assertIsArray($response['body']['deploymentsStorage']); - $this->assertIsArray($response['body']['buildsTotal']); + $this->assertIsArray($response['body']['builds']); + $this->assertIsArray($response['body']['buildsTime']); $this->assertIsArray($response['body']['buildsStorage']); $this->assertIsArray($response['body']['buildsTime']); - $this->assertIsArray($response['body']['executionsTotal']); + $this->assertIsArray($response['body']['executions']); $this->assertIsArray($response['body']['executionsTime']); } diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 7cf99896d2..91fe2d97dc 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -451,17 +451,18 @@ class ProjectsConsoleClientTest extends Scope ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(count($response['body']), 9); + $this->assertEquals(9, count($response['body'])); $this->assertNotEmpty($response['body']); $this->assertEquals('30d', $response['body']['range']); - $this->assertIsArray($response['body']['requestsTotal']); + $this->assertIsArray($response['body']['requests']); $this->assertIsArray($response['body']['network']); - $this->assertIsArray($response['body']['executionsTotal']); - $this->assertIsArray($response['body']['documentsTotal']); - $this->assertIsArray($response['body']['databasesTotal']); - $this->assertIsArray($response['body']['bucketsTotal']); - $this->assertIsArray($response['body']['usersTotal']); - $this->assertIsArray($response['body']['filesStorage']); + $this->assertIsNumeric($response['body']['executionsTotal']); + $this->assertIsNumeric($response['body']['documentsTotal']); + $this->assertIsNumeric($response['body']['databasesTotal']); + $this->assertIsNumeric($response['body']['bucketsTotal']); + $this->assertIsNumeric($response['body']['usersTotal']); + $this->assertIsNumeric($response['body']['filesStorageTotal']); + /** * Test for FAILURE diff --git a/tests/e2e/Services/Storage/StorageConsoleClientTest.php b/tests/e2e/Services/Storage/StorageConsoleClientTest.php index aff055f18d..e75af0e1a3 100644 --- a/tests/e2e/Services/Storage/StorageConsoleClientTest.php +++ b/tests/e2e/Services/Storage/StorageConsoleClientTest.php @@ -38,12 +38,15 @@ class StorageConsoleClientTest extends Scope 'range' => '24h' ]); - $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(4, count($response['body'])); - $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['bucketsTotal']); - $this->assertIsArray($response['body']['filesTotal']); - $this->assertIsArray($response['body']['filesStorage']); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(7, count($response['body'])); + $this->assertEquals('24h', $response['body']['range']); + $this->assertIsNumeric($response['body']['bucketsTotal']); + $this->assertIsNumeric($response['body']['filesTotal']); + $this->assertIsNumeric($response['body']['filesStorageTotal']); + $this->assertIsArray($response['body']['buckets']); + $this->assertIsArray($response['body']['files']); + $this->assertIsArray($response['body']['storage']); } public function testGetStorageBucketUsage() @@ -71,7 +74,7 @@ class StorageConsoleClientTest extends Scope 'range' => '32h' ]); - $this->assertEquals($response['headers']['status-code'], 400); + $this->assertEquals(400, $response['headers']['status-code']); // TODO: Uncomment once we implement check for missing bucketId in the usage endpoint. @@ -82,7 +85,7 @@ class StorageConsoleClientTest extends Scope 'range' => '24h' ]); - $this->assertEquals($response['headers']['status-code'], 404); + $this->assertEquals(404, $response['headers']['status-code']); /** * Test for SUCCESS @@ -94,10 +97,12 @@ class StorageConsoleClientTest extends Scope 'range' => '24h' ]); - $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 3); - $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['filesTotal']); - $this->assertIsArray($response['body']['filesStorage']); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, count($response['body'])); + $this->assertEquals('24h', $response['body']['range']); + $this->assertIsNumeric($response['body']['filesTotal']); + $this->assertIsNumeric($response['body']['filesStorageTotal']); + $this->assertIsArray($response['body']['files']); + $this->assertIsArray($response['body']['storage']); } } diff --git a/tests/e2e/Services/Users/UsersConsoleClientTest.php b/tests/e2e/Services/Users/UsersConsoleClientTest.php index 8943bfab63..0f5c4602b2 100644 --- a/tests/e2e/Services/Users/UsersConsoleClientTest.php +++ b/tests/e2e/Services/Users/UsersConsoleClientTest.php @@ -37,10 +37,12 @@ class UsersConsoleClientTest extends Scope 'range' => '24h', ]); - $this->assertEquals($response['headers']['status-code'], 200); - $this->assertEquals(count($response['body']), 3); - $this->assertEquals($response['body']['range'], '24h'); - $this->assertIsArray($response['body']['usersTotal']); - $this->assertIsArray($response['body']['sessionsTotal']); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, count($response['body'])); + $this->assertEquals('24h', $response['body']['range']); + $this->assertIsNumeric($response['body']['usersTotal']); + $this->assertIsNumeric($response['body']['sessionsTotal']); + $this->assertIsArray($response['body']['users']); + $this->assertIsArray($response['body']['sessions']); } }