mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\General;
|
||||
|
||||
@@ -937,7 +937,7 @@ class UsageTest extends Scope
|
||||
|
||||
$this->assertEquals(201, $response['headers']['status-code']);
|
||||
$this->assertNotEmpty($response['body']['$id']);
|
||||
$this->assertEquals($functionId, $response['body']['resourceId']);
|
||||
$this->assertEquals($functionId, $response['body']['functionId']);
|
||||
|
||||
$executionTime += (int) ($response['body']['duration'] * 1000);
|
||||
|
||||
@@ -961,7 +961,7 @@ class UsageTest extends Scope
|
||||
|
||||
$this->assertEquals(201, $response['headers']['status-code']);
|
||||
$this->assertNotEmpty($response['body']['$id']);
|
||||
$this->assertEquals($functionId, $response['body']['resourceId']);
|
||||
$this->assertEquals($functionId, $response['body']['functionId']);
|
||||
|
||||
if ($response['body']['status'] == 'failed') {
|
||||
$failures += 1;
|
||||
@@ -984,7 +984,7 @@ class UsageTest extends Scope
|
||||
|
||||
$this->assertEquals(202, $response['headers']['status-code']);
|
||||
$this->assertNotEmpty($response['body']['$id']);
|
||||
$this->assertEquals($functionId, $response['body']['resourceId']);
|
||||
$this->assertEquals($functionId, $response['body']['functionId']);
|
||||
|
||||
sleep(self::WAIT);
|
||||
|
||||
|
||||
@@ -850,12 +850,12 @@ class FunctionsCustomServerTest extends Scope
|
||||
|
||||
$this->assertEquals(201, $execution['headers']['status-code']);
|
||||
$this->assertNotEmpty($execution['body']['$id']);
|
||||
$this->assertNotEmpty($execution['body']['resourceId']);
|
||||
$this->assertNotEmpty($execution['body']['functionId']);
|
||||
$this->assertEquals(true, (new DatetimeValidator())->isValid($execution['body']['$createdAt']));
|
||||
$this->assertEquals($data['functionId'], $execution['body']['resourceId']);
|
||||
$this->assertEquals($data['functionId'], $execution['body']['functionId']);
|
||||
$this->assertEquals('completed', $execution['body']['status']);
|
||||
$this->assertEquals(200, $execution['body']['responseStatusCode']);
|
||||
$this->assertStringContainsString($execution['body']['resourceId'], $execution['body']['responseBody']);
|
||||
$this->assertStringContainsString($execution['body']['functionId'], $execution['body']['responseBody']);
|
||||
$this->assertStringContainsString($data['deploymentId'], $execution['body']['responseBody']);
|
||||
$this->assertStringContainsString('Test1', $execution['body']['responseBody']);
|
||||
$this->assertStringContainsString('http', $execution['body']['responseBody']);
|
||||
@@ -941,7 +941,7 @@ class FunctionsCustomServerTest extends Scope
|
||||
$this->assertEquals(1, $executions['body']['total']);
|
||||
$this->assertIsInt($executions['body']['total']);
|
||||
$this->assertCount(1, $executions['body']['executions']);
|
||||
$this->assertEquals($data['functionId'], $executions['body']['executions'][0]['resourceId']);
|
||||
$this->assertEquals($data['functionId'], $executions['body']['executions'][0]['functionId']);
|
||||
|
||||
$executions = $this->listExecutions($data['functionId'], [
|
||||
'search' => $data['functionId'],
|
||||
|
||||
Reference in New Issue
Block a user