mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Make test project apiKey name unique per project so migration succeeds
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user