mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Create rule in function logging test
This commit is contained in:
@@ -1954,6 +1954,24 @@ class FunctionsCustomServerTest extends Scope
|
||||
|
||||
$functionId = $function['body']['$id'] ?? '';
|
||||
|
||||
$rule = $this->client->call(
|
||||
Client::METHOD_POST,
|
||||
'/proxy/rules',
|
||||
array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()),
|
||||
[
|
||||
'domain' => 'test-' . ID::unique() . System::getEnv('_APP_DOMAIN_FUNCTIONS'),
|
||||
'resourceType' => 'function',
|
||||
'resourceId' => $functionId,
|
||||
],
|
||||
);
|
||||
|
||||
$this->assertEquals(201, $rule['headers']['status-code']);
|
||||
$this->assertNotEmpty($rule['body']['$id']);
|
||||
$this->assertNotEmpty($rule['body']['domain']);
|
||||
|
||||
$this->setupDeployment($functionId, [
|
||||
'code' => $this->packageFunction('node'),
|
||||
'activate' => true
|
||||
|
||||
Reference in New Issue
Block a user