diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 268f2b06d5..7a49c70fcc 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -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, diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 659ad16170..2bdad22e8f 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -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 diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index bedeee6ed6..d2443783c0 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -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']); diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 9a2afde739..1654fd4af4 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -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;