diff --git a/composer.lock b/composer.lock index 8634289c82..8c803fa22c 100644 --- a/composer.lock +++ b/composer.lock @@ -4679,12 +4679,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "16ff6ce143a7aff20bc8c86007264bce4c767ca2" + "reference": "91140887b9ff8efcefe326857115bd37c90db1cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/16ff6ce143a7aff20bc8c86007264bce4c767ca2", - "reference": "16ff6ce143a7aff20bc8c86007264bce4c767ca2", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/91140887b9ff8efcefe326857115bd37c90db1cf", + "reference": "91140887b9ff8efcefe326857115bd37c90db1cf", "shasum": "" }, "require": { @@ -4744,7 +4744,7 @@ "source": "https://github.com/utopia-php/migration/tree/add-policies-migration", "issues": "https://github.com/utopia-php/migration/issues" }, - "time": "2026-05-20T12:08:45+00:00" + "time": "2026-05-21T12:22:42+00:00" }, { "name": "utopia-php/mongo", diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index f51a938c5e..f0c8f2963e 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -2554,10 +2554,14 @@ trait MigrationsBase 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], ]; + // Unique name so re-runs and parallel suites can't match a stale key + // left behind by a previous crashed run. + $keyName = 'Test API Key ' . ID::unique(); + // Create API key on source project $response = $this->client->call(Client::METHOD_POST, '/project/keys', $sourceHeaders, [ 'keyId' => ID::unique(), - 'name' => 'Test API Key', + 'name' => $keyName, 'scopes' => ['databases.read', 'databases.write'], 'expire' => null, ]); @@ -2596,7 +2600,7 @@ trait MigrationsBase $foundKey = null; foreach ($response['body']['keys'] as $k) { - if ($k['name'] === 'Test API Key') { + if ($k['name'] === $keyName) { $foundKey = $k; break; @@ -2604,7 +2608,7 @@ trait MigrationsBase } $this->assertNotNull($foundKey); - $this->assertEquals('Test API Key', $foundKey['name']); + $this->assertEquals($keyName, $foundKey['name']); $this->assertEqualsCanonicalizing(['databases.read', 'databases.write'], $foundKey['scopes']); $this->assertEmpty($foundKey['expire']); $this->assertNotEquals($apiKey['secret'], $foundKey['secret']);