mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
FIx missing event data; improve test
This commit is contained in:
@@ -78,6 +78,8 @@ class Update extends Action
|
||||
throw new Exception(Exception::RULE_NOT_FOUND);
|
||||
}
|
||||
|
||||
$queueForEvents->setParam('ruleId', $rule->getId());
|
||||
|
||||
if ($rule->getAttribute('status', '') !== RULE_STATUS_VERIFICATION_FAILED) {
|
||||
return $response->dynamic($rule, Response::MODEL_PROXY_RULE);
|
||||
}
|
||||
@@ -106,8 +108,6 @@ class Update extends Action
|
||||
]))
|
||||
->trigger();
|
||||
|
||||
$queueForEvents->setParam('ruleId', $rule->getId());
|
||||
|
||||
// Fill response model
|
||||
$certificate = $dbForPlatform->getDocument('certificates', $rule->getAttribute('certificateId', ''));
|
||||
$rule->setAttribute('logs', $certificate->getAttribute('logs', ''));
|
||||
|
||||
@@ -582,6 +582,14 @@ class ProxyCustomServerTest extends Scope
|
||||
$this->assertEquals(201, $rule['headers']['status-code']);
|
||||
$this->assertEquals(RULE_STATUS_GENERATING_CERTIFICATE, $rule['body']['status']);
|
||||
$this->assertEmpty($rule['body']['verificationLogs']);
|
||||
$this->assertNotEmpty($rule['body']['$id']);
|
||||
$ruleId = $rule['body']['$id'];
|
||||
|
||||
$rule = $this->updateRuleVerification($ruleId);
|
||||
$this->assertEquals(200, $rule['headers']['status-code']);
|
||||
$this->assertEquals($ruleId, $rule['body']['$id']);
|
||||
$this->assertEquals(RULE_STATUS_GENERATING_CERTIFICATE, $rule['body']['status']);
|
||||
$this->assertEmpty($rule['body']['verificationLogs']);
|
||||
|
||||
$this->cleanupRule($rule['body']['$id']);
|
||||
$this->cleanupSite($siteId);
|
||||
|
||||
Reference in New Issue
Block a user