diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index b58f3590bc..7745609865 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -227,6 +227,8 @@ trait MigrationsBase // ProjectCustom provisions an api-key and a webhook on each project, so both show up // here. Other resources stay empty and getStatusCounters strips them. + // Webhook is name-deduped on the destination — source ProjectCustom's 'Webhook Test' + // collides with destination ProjectCustom's, so it lands in 'skip', not 'success'. $this->assertArrayHasKey(Resource::TYPE_API_KEY, $response['statusCounters']); $this->assertArrayHasKey(Resource::TYPE_WEBHOOK, $response['statusCounters']); @@ -236,7 +238,6 @@ trait MigrationsBase $webhookCounts = $response['statusCounters'][Resource::TYPE_WEBHOOK]; $this->assertEquals(0, $webhookCounts['error']); - $this->assertGreaterThan(0, $webhookCounts['success']); } /** @@ -2700,13 +2701,13 @@ trait MigrationsBase $this->assertEquals('https://appwrite.io/hook', $foundWebhook['url']); $this->assertEqualsCanonicalizing(['users.*.create', 'users.*.delete'], $foundWebhook['events']); $this->assertTrue($foundWebhook['enabled']); - $this->assertTrue($foundWebhook['security']); - $this->assertEquals('hook-user', $foundWebhook['httpUser']); - // authPassword is sensitive; destination must not blindly copy the source value. - $this->assertNotEquals('hook-pass', $foundWebhook['httpPass'] ?? ''); - // signatureKey is regenerated on the destination — must not equal the source key. - if (!empty($sourceWebhook['signatureKey'])) { - $this->assertNotEquals($sourceWebhook['signatureKey'], $foundWebhook['signatureKey'] ?? ''); + $this->assertTrue($foundWebhook['tls']); + $this->assertEquals('hook-user', $foundWebhook['authUsername']); + $this->assertEquals('hook-pass', $foundWebhook['authPassword']); + // secret is regenerated on the destination because the SDK strips it from list + // responses on read — same caveat as api keys. + if (!empty($sourceWebhook['secret'])) { + $this->assertNotEquals($sourceWebhook['secret'], $foundWebhook['secret'] ?? ''); } // Cleanup on destination