From ba74ffd4bf95d348f12f105f69f4bbdc5f4b700f Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:48:26 +0530 Subject: [PATCH] Address PR comments --- app/config/services.php | 2 +- .../Functions/FunctionsCustomServerTest.php | 39 +++++++++---------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/app/config/services.php b/app/config/services.php index e8789fcbec..d3e221e2fa 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -176,7 +176,7 @@ return [ 'sites' => [ 'key' => 'sites', 'name' => 'Sites', - 'subtitle' => 'The Sites Service allows you view, create and manage your Cloud Sites.', + 'subtitle' => 'The Sites Service allows you view, create and manage your web applications.', 'description' => '/docs/services/sites.md', 'controller' => 'api/sites.php', 'sdk' => true, diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index f7a856a76f..67f2f17c86 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -73,6 +73,24 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $variable2['headers']['status-code']); $this->assertEquals(201, $variable3['headers']['status-code']); + /** + * Test for FAILURE + */ + $function2 = $this->createFunction([ + 'functionId' => ID::unique(), + 'name' => 'Test', + 'runtime' => 'php-8.0', + 'entrypoint' => 'index.php', + 'events' => [ + 'buckets.*.create', + 'buckets.*.delete', + ], + 'timeout' => 10, + 'subdomain' => 'test' + ]); + + $this->assertEquals(400, $function2['headers']['status-code']); + return [ 'functionId' => $functionId, ]; @@ -1985,25 +2003,4 @@ class FunctionsCustomServerTest extends Scope $this->cleanupFunction($functionId); } - - /** - * @depends testCreateFunction - */ - public function testUniqueSubdomain(array $data): void - { - $function = $this->createFunction([ - 'functionId' => ID::unique(), - 'name' => 'Test', - 'runtime' => 'php-8.0', - 'entrypoint' => 'index.php', - 'events' => [ - 'buckets.*.create', - 'buckets.*.delete', - ], - 'timeout' => 10, - 'subdomain' => 'test' - ]); - - $this->assertEquals(400, $function['headers']['status-code']); - } }