Address PR comments

This commit is contained in:
Khushboo Verma 2024-11-11 11:48:26 +05:30
parent b88cd8e544
commit ba74ffd4bf
2 changed files with 19 additions and 22 deletions

View file

@ -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,

View file

@ -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']);
}
}