From 3f4637887fed058b54b607051699c4c3da39eea3 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Tue, 26 May 2026 11:43:36 +0100 Subject: [PATCH] Make test project apiKey name unique per project so migration succeeds --- tests/e2e/Scopes/ProjectCustom.php | 2 +- tests/e2e/Services/Migrations/MigrationsBase.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index c34a6527f9..c8a3704d57 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -111,7 +111,7 @@ trait ProjectCustom 'x-appwrite-project' => 'console', ], [ 'keyId' => ID::unique(), - 'name' => 'Demo Project Key', + 'name' => 'Demo Project Key ' . $project['body']['$id'], 'scopes' => [ 'users.read', 'users.write', diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index d9f5b0b41e..c4bfb585a2 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -225,11 +225,10 @@ trait MigrationsBase $this->assertEquals('Appwrite', $response['source']); $this->assertEquals('Appwrite', $response['destination']); - // Auth apiKey name-collides with destination's own and gets skipped — treat success or skip as processed. $counts = $response['statusCounters'][Resource::TYPE_API_KEY]; $this->assertEquals([Resource::TYPE_API_KEY], array_keys($response['statusCounters'])); $this->assertEquals(0, $counts['error']); - $this->assertGreaterThan(0, $counts['success'] + $counts['skip']); + $this->assertGreaterThan(0, $counts['success']); } /**