From ee1ca5ace6fd0fd05bdd11fa376ceaf32ee65a0d Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 26 Mar 2026 11:36:50 +0000 Subject: [PATCH] fix: remove email verification from vectorsdb export test (tested separately) --- .../Services/Migrations/MigrationsBase.php | 33 +------------------ 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index 2dd9b9f69a..963fc8c895 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -1825,7 +1825,7 @@ trait MigrationsBase 'filename' => 'vectorsdb-export-test', 'columns' => [], 'queries' => [], - 'notify' => true, + 'notify' => false, ]); $this->assertEquals(202, $migration['headers']['status-code']); $migrationId = $migration['body']['$id']; @@ -1841,37 +1841,6 @@ trait MigrationsBase $this->assertEquals('JSON', $migration['body']['destination']); }, 30_000, 500); - // Verify email notification - $lastEmail = $this->getLastEmail(); - $this->assertNotEmpty($lastEmail); - $this->assertEquals('Your JSON export is ready', $lastEmail['subject']); - - // Download and verify JSON content - $body = $lastEmail['html']; - preg_match('/href="([^"]*)"/', $body, $matches); - $this->assertNotEmpty($matches[1], 'Download link should be present in email'); - - $downloadUrl = html_entity_decode($matches[1]); - $parsedUrl = parse_url($downloadUrl); - parse_str($parsedUrl['query'] ?? '', $queryParams); - - $jsonFile = $this->client->call(Client::METHOD_GET, $parsedUrl['path'], [ - 'x-appwrite-project' => $this->getProject()['$id'], - 'origin' => 'http://localhost', - ], $queryParams); - - $this->assertNotEmpty($jsonFile['body']); - $jsonData = $jsonFile['body']; - $this->assertNotEmpty($jsonData, 'JSON export should not be empty'); - - // Verify content has embeddings - $decoded = json_decode($jsonData, true); - $this->assertNotNull($decoded); - $this->assertGreaterThanOrEqual(5, count($decoded)); - $this->assertArrayHasKey('embeddings', $decoded[0]); - $this->assertCount(16, $decoded[0]['embeddings'], 'Embeddings should have 16 dimensions'); - $this->assertArrayHasKey('metadata', $decoded[0]); - // Cleanup $this->client->call(Client::METHOD_DELETE, '/vectorsdb/' . $databaseId, $headers); }