Merge pull request #7777 from appwrite/fix-cloud-tests
Fix tests required for Cloud
This commit is contained in:
commit
20e82b1b8b
|
@ -4266,7 +4266,7 @@ trait DatabasesBase
|
|||
], $this->getHeaders()), [
|
||||
'documentId' => ID::unique(),
|
||||
'data' => [
|
||||
'longtext' => file_get_contents('tests/resources/longtext.txt'),
|
||||
'longtext' => file_get_contents(__DIR__ . '/../../../resources/longtext.txt'),
|
||||
],
|
||||
'permissions' => [
|
||||
Permission::read(Role::user($this->getUser()['$id'])),
|
||||
|
|
|
@ -227,9 +227,9 @@ trait LocaleBase
|
|||
/**
|
||||
* Test for SUCCESS
|
||||
*/
|
||||
$languages = require('app/config/locale/codes.php');
|
||||
$defaultCountries = require('app/config/locale/countries.php');
|
||||
$defaultContinents = require('app/config/locale/continents.php');
|
||||
$languages = require(__DIR__ . '/../../../../app/config/locale/codes.php');
|
||||
$defaultCountries = require(__DIR__ . '/../../../../app/config/locale/countries.php');
|
||||
$defaultContinents = require(__DIR__ . '/../../../../app/config/locale/continents.php');
|
||||
|
||||
foreach ($languages as $lang) {
|
||||
$response = $this->client->call(Client::METHOD_GET, '/locale/countries', [
|
||||
|
|
|
@ -798,7 +798,7 @@ class ProjectsConsoleClientTest extends Scope
|
|||
public function testUpdateProjectOAuth($data): array
|
||||
{
|
||||
$id = $data['projectId'] ?? '';
|
||||
$providers = require('app/config/providers.php');
|
||||
$providers = require(__DIR__ . '/../../../../app/config/providers.php');
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
|
@ -909,7 +909,7 @@ class ProjectsConsoleClientTest extends Scope
|
|||
public function testUpdateProjectAuthStatus($data): array
|
||||
{
|
||||
$id = $data['projectId'] ?? '';
|
||||
$auth = require('app/config/auth.php');
|
||||
$auth = require(__DIR__ . '/../../../../app/config/auth.php');
|
||||
|
||||
$originalEmail = uniqid() . 'user@localhost.test';
|
||||
$originalPassword = 'password';
|
||||
|
@ -1732,7 +1732,7 @@ class ProjectsConsoleClientTest extends Scope
|
|||
$this->assertNotEmpty($project['body']['$id']);
|
||||
|
||||
$id = $project['body']['$id'];
|
||||
$services = require('app/config/services.php');
|
||||
$services = require(__DIR__ . '/../../../../app/config/services.php');
|
||||
|
||||
/**
|
||||
* Test for Disabled
|
||||
|
@ -1806,7 +1806,7 @@ class ProjectsConsoleClientTest extends Scope
|
|||
{
|
||||
$id = $data['projectId'];
|
||||
|
||||
$services = require('app/config/services.php');
|
||||
$services = require(__DIR__ . '/../../../../app/config/services.php');
|
||||
|
||||
/**
|
||||
* Test for Disabled
|
||||
|
@ -1880,7 +1880,7 @@ class ProjectsConsoleClientTest extends Scope
|
|||
{
|
||||
$id = $data['projectId'];
|
||||
|
||||
$services = require('app/config/services.php');
|
||||
$services = require(__DIR__ . '/../../../../app/config/services.php');
|
||||
|
||||
/**
|
||||
* Test for Disabled
|
||||
|
|
|
@ -28,9 +28,9 @@ class EventTest extends TestCase
|
|||
'pass' => App::getEnv('_APP_REDIS_PASS', ''),
|
||||
]);
|
||||
|
||||
$dsn = App::getEnv('_APP_CONNECTIONS_QUEUE', $fallbackForRedis);
|
||||
$dsn = App::getEnv('_APP_CONNECTIONS_QUEUE', 'redis=' . $fallbackForRedis);
|
||||
$dsn = explode('=', $dsn);
|
||||
$dsn = $dsn[0] ?? '';
|
||||
$dsn = $dsn[1] ?? '';
|
||||
$dsn = new DSN($dsn);
|
||||
$connection = new Queue\Connection\Redis($dsn->getHost(), $dsn->getPort());
|
||||
$this->queue = 'v1-tests' . uniqid();
|
||||
|
|
Loading…
Reference in a new issue