mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: fix tests
This commit is contained in:
@@ -942,7 +942,6 @@ App::post('/v1/functions/:functionId/executions')
|
||||
try {
|
||||
$executionResponse = $executor->createExecution(
|
||||
projectId: $project->getId(),
|
||||
functionId: $function->getId(),
|
||||
deploymentId: $deployment->getId(),
|
||||
path: $build->getAttribute('outputPath', ''),
|
||||
vars: $vars,
|
||||
|
||||
@@ -36,7 +36,6 @@ class Executor
|
||||
*
|
||||
* Launches a runtime container for a deployment ready for execution
|
||||
*
|
||||
* @param string $functionId
|
||||
* @param string $deploymentId
|
||||
* @param string $projectId
|
||||
* @param string $source
|
||||
@@ -126,7 +125,6 @@ class Executor
|
||||
* Create an execution
|
||||
*
|
||||
* @param string $projectId
|
||||
* @param string $functionId
|
||||
* @param string $deploymentId
|
||||
* @param string $path
|
||||
* @param array $vars
|
||||
|
||||
@@ -383,7 +383,7 @@ class FunctionsCustomClientTest extends Scope
|
||||
'async' => false
|
||||
]);
|
||||
|
||||
$output = json_decode($execution['body']['response'], true);
|
||||
$output = json_decode($execution['body']['stdout'], true);
|
||||
$this->assertEquals(201, $execution['headers']['status-code']);
|
||||
$this->assertEquals('completed', $execution['body']['status']);
|
||||
$this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']);
|
||||
|
||||
@@ -594,12 +594,12 @@ class FunctionsCustomServerTest extends Scope
|
||||
]);
|
||||
|
||||
$this->assertEquals('completed', $execution['body']['status']);
|
||||
$this->assertStringContainsString($data['deploymentId'], $execution['body']['response']);
|
||||
$this->assertStringContainsString('Test1', $execution['body']['response']);
|
||||
$this->assertStringContainsString('http', $execution['body']['response']);
|
||||
$this->assertStringContainsString('PHP', $execution['body']['response']);
|
||||
$this->assertStringContainsString('8.0', $execution['body']['response']);
|
||||
// $this->assertStringContainsString('êä', $execution['body']['response']); // tests unknown utf-8 chars
|
||||
$this->assertStringContainsString($data['deploymentId'], $execution['body']['stdout']);
|
||||
$this->assertStringContainsString('Test1', $execution['body']['stdout']);
|
||||
$this->assertStringContainsString('http', $execution['body']['stdout']);
|
||||
$this->assertStringContainsString('PHP', $execution['body']['stdout']);
|
||||
$this->assertStringContainsString('8.0', $execution['body']['stdout']);
|
||||
// $this->assertStringContainsString('êä', $execution['body']['sdtout']); // tests unknown utf-8 chars
|
||||
$this->assertLessThan(0.500, $execution['body']['time']);
|
||||
|
||||
return $data;
|
||||
|
||||
Reference in New Issue
Block a user