2023-03-31 15:14:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Tests\E2E\Services\Console;
|
|
|
|
|
|
|
|
|
|
use Tests\E2E\Client;
|
|
|
|
|
use Tests\E2E\Scopes\ProjectConsole;
|
|
|
|
|
use Tests\E2E\Scopes\Scope;
|
|
|
|
|
use Tests\E2E\Scopes\SideClient;
|
|
|
|
|
|
|
|
|
|
class ConsoleConsoleClientTest extends Scope
|
|
|
|
|
{
|
|
|
|
|
use ConsoleBase;
|
|
|
|
|
use ProjectConsole;
|
|
|
|
|
use SideClient;
|
|
|
|
|
|
|
|
|
|
public function testGetVariables(): void
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Test for SUCCESS
|
|
|
|
|
*/
|
|
|
|
|
$response = $this->client->call(Client::METHOD_GET, '/console/variables', array_merge([
|
|
|
|
|
'content-type' => 'application/json',
|
|
|
|
|
'x-appwrite-project' => $this->getProject()['$id'],
|
2023-08-23 01:35:00 +00:00
|
|
|
], $this->getHeaders()));
|
2023-03-31 15:14:59 +00:00
|
|
|
|
|
|
|
|
$this->assertEquals(200, $response['headers']['status-code']);
|
2025-08-05 11:44:06 +00:00
|
|
|
$this->assertCount(14, $response['body']);
|
2025-04-08 14:48:50 +00:00
|
|
|
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET_CNAME']);
|
|
|
|
|
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET_A']);
|
|
|
|
|
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET_AAAA']);
|
2025-08-05 11:44:06 +00:00
|
|
|
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET_CAA']);
|
2023-03-31 15:14:59 +00:00
|
|
|
$this->assertIsInt($response['body']['_APP_STORAGE_LIMIT']);
|
2024-10-27 16:22:45 +00:00
|
|
|
$this->assertIsInt($response['body']['_APP_COMPUTE_SIZE_LIMIT']);
|
2023-08-30 05:10:08 +00:00
|
|
|
$this->assertIsBool($response['body']['_APP_DOMAIN_ENABLED']);
|
2023-08-23 01:35:00 +00:00
|
|
|
$this->assertIsBool($response['body']['_APP_VCS_ENABLED']);
|
|
|
|
|
$this->assertIsBool($response['body']['_APP_ASSISTANT_ENABLED']);
|
2024-11-20 09:16:04 +00:00
|
|
|
$this->assertIsString($response['body']['_APP_DOMAIN_SITES']);
|
2025-04-01 13:29:07 +00:00
|
|
|
$this->assertIsString($response['body']['_APP_DOMAIN_FUNCTIONS']);
|
2024-11-20 10:42:35 +00:00
|
|
|
$this->assertIsString($response['body']['_APP_OPTIONS_FORCE_HTTPS']);
|
2025-02-22 17:32:10 +00:00
|
|
|
$this->assertIsString($response['body']['_APP_DOMAINS_NAMESERVERS']);
|
2025-02-23 16:08:12 +00:00
|
|
|
// When adding new keys, dont forget to update count a few lines above
|
2023-03-31 15:14:59 +00:00
|
|
|
}
|
|
|
|
|
}
|