mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: update testCreateCustomExecution()
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user