From bb0f40569f738cebb830629d2342b7a879757f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 9 Jan 2025 14:57:42 +0000 Subject: [PATCH] Fix V2 tests --- app/controllers/mock.php | 6 +++++- tests/e2e/Services/Functions/FunctionsCustomServerTest.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/mock.php b/app/controllers/mock.php index afbb176b7e..7b33514fff 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -150,7 +150,11 @@ App::patch('/v1/mock/functions-v2') throw new Exception(Exception::FUNCTION_NOT_FOUND); } - $dbForProject->updateDocument('functions', $function->getId(), $function->setAttribute('version', 'v2')); + $function = $function + ->setAttribute('version', 'v2') + ->setAttribute('runtime', 'php-8.0'); + + $dbForProject->updateDocument('functions', $function->getId(), $function); $response->noContent(); }); diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 0cd00d700e..ba9713021d 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -1422,7 +1422,7 @@ class FunctionsCustomServerTest extends Scope $functionId = $this->setupFunction([ 'functionId' => ID::unique(), 'name' => 'Test PHP V2', - 'runtime' => 'php-8.3', + 'runtime' => 'php-8.3', // Changed to php 8.0 in v2 update endpoint 'entrypoint' => 'index.php', 'events' => [], 'timeout' => 15,