From 0372c8e09650bc319f1abbbc8c175dc5f22de6bf Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 25 Jan 2022 03:38:11 +0400 Subject: [PATCH] feat: update testCreateCustomExecution() --- .../Services/Functions/FunctionsCustomClientTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index a15887ca1d..f9ea35aa8a 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -158,7 +158,7 @@ class FunctionsCustomClientTest extends Scope $this->assertEquals(201, $function['headers']['status-code']); - $tag = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/tags', [ + $deployment = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/deployments', [ 'content-type' => 'multipart/form-data', 'x-appwrite-project' => $projectId, 'x-appwrite-key' => $apikey, @@ -167,19 +167,19 @@ class FunctionsCustomClientTest extends Scope 'code' => new CURLFile(realpath(__DIR__ . '/../../../resources/functions/php-fn.tar.gz'), 'application/x-gzip', 'php-fx.tar.gz'), //different tarball names intentional ]); - $tagId = $tag['body']['$id'] ?? ''; + $deploymentId = $deployment['body']['$id'] ?? ''; - // Wait for tag to be built. + // Wait for deployment to be built. sleep(5); - $this->assertEquals(201, $tag['headers']['status-code']); + $this->assertEquals(201, $deployment['headers']['status-code']); - $function = $this->client->call(Client::METHOD_PATCH, '/functions/'.$functionId.'/tag', [ + $function = $this->client->call(Client::METHOD_PATCH, '/functions/'.$functionId.'/deployment', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'x-appwrite-key' => $apikey, ], [ - 'tag' => $tagId, + 'deployment' => $deploymentId, ]); $this->assertEquals(200, $function['headers']['status-code']);