diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index bda83bb06c..98efe550ea 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -17,6 +17,7 @@ trait WebhooksBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ + 'collectionId' => 'unique()', 'name' => 'Actors', 'read' => ['role:all'], 'write' => ['role:all'], @@ -108,6 +109,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'documentId' => 'unique()', 'data' => [ 'firstName' => 'Chris', 'lastName' => 'Evans', @@ -193,6 +195,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'documentId' => 'unique()', 'data' => [ 'firstName' => 'Bradly', 'lastName' => 'Cooper', @@ -242,6 +245,7 @@ trait WebhooksBase 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'fileId' => 'unique()', 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'logo.png'), 'read' => ['role:all'], 'write' => ['role:all'], @@ -364,6 +368,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'teamId' => 'unique()', 'name' => 'Arsenal' ]); @@ -441,6 +446,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'teamId' => 'unique()', 'name' => 'Chelsea' ]); @@ -489,6 +495,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'membershipId' => 'unique()', 'email' => $email, 'name' => 'Friend User', 'roles' => ['admin', 'editor'], @@ -547,6 +554,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'membershipId' => 'unique()', 'email' => $email, 'name' => 'Friend User', 'roles' => ['admin', 'editor'], diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 2f254b0e6d..8be5db85b8 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -122,6 +122,7 @@ class WebhooksCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ + 'collectionId' => 'unique()', 'name' => 'Demo', 'read' => ['role:all'], 'write' => ['role:all'], @@ -171,6 +172,7 @@ class WebhooksCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'userId' => 'unique()', 'email' => $email, 'password' => $password, 'name' => $name, @@ -322,6 +324,7 @@ class WebhooksCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'functionId' => 'unique()', 'name' => 'Test', 'execute' => ['role:all'], 'runtime' => 'php-8.0', @@ -401,6 +404,7 @@ class WebhooksCustomServerTest extends Scope 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ + 'tagId' => 'unique()', 'command' => 'php index.php', 'code' => new CURLFile(realpath(__DIR__ . '/../../../resources/functions/timeout.tar.gz'), 'application/x-gzip', 'php-fx.tar.gz'), ]); @@ -474,7 +478,7 @@ class WebhooksCustomServerTest extends Scope $execution = $this->client->call(Client::METHOD_POST, '/functions/'.$data['functionId'].'/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), []); + ], $this->getHeaders()), ['executionId' => 'unique()',]); $this->assertEquals($execution['headers']['status-code'], 201); $this->assertNotEmpty($execution['body']['$id']);