Make test project apiKey name unique per project so migration succeeds

This commit is contained in:
Prem Palanisamy
2026-05-26 11:43:36 +01:00
parent edb32d04fe
commit 3f4637887f
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -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',
@@ -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']);
}
/**