mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Add subdomain param in functions and tests
This commit is contained in:
@@ -36,6 +36,7 @@ class FunctionsCustomServerTest extends Scope
|
||||
'buckets.*.delete',
|
||||
],
|
||||
'timeout' => 10,
|
||||
'subdomain' => 'test'
|
||||
]);
|
||||
|
||||
$functionId = $functionId = $function['body']['$id'] ?? '';
|
||||
@@ -1984,4 +1985,25 @@ 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']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user