From ddbda8bea60657aaa2a9ee33dc50f5ed125a3611 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 25 Jan 2022 03:46:43 +0400 Subject: [PATCH] feat: update RealtimeCustomClientTest --- .../Services/Realtime/RealtimeCustomClientTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index a4d094dacc..95b4dd4423 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -985,7 +985,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals($function['headers']['status-code'], 201); $this->assertNotEmpty($function['body']['$id']); - $tag = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/tags', array_merge([ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', array_merge([ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -994,20 +994,20 @@ class RealtimeCustomClientTest extends Scope 'code' => new CURLFile(realpath(__DIR__ . '/../../../resources/functions/timeout.tar.gz'), 'application/x-gzip', 'php-fx.tar.gz'), ]); - $tagId = $tag['body']['$id'] ?? ''; + $deploymentId = $deployment['body']['$id'] ?? ''; - $this->assertEquals($tag['headers']['status-code'], 201); - $this->assertNotEmpty($tag['body']['$id']); + $this->assertEquals($deployment['headers']['status-code'], 201); + $this->assertNotEmpty($deployment['body']['$id']); - // Wait for tag to be built. + // Wait for deployment to be built. sleep(5); - $response = $this->client->call(Client::METHOD_PATCH, '/functions/'.$functionId.'/tag', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/functions/'.$functionId.'/deployment', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tag' => $tagId, + 'deployment' => $deploymentId, ]); $this->assertEquals($response['headers']['status-code'], 200);