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