mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
$this->webEndpoint,
This commit is contained in:
@@ -86,8 +86,11 @@ class CompressionTest extends Scope
|
||||
|
||||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
$this->assertArrayNotHasKey('content-encoding', $response['headers']);
|
||||
$this->assertEquals('chunked', $response['headers']['transfer-encoding'] ?? null, 'Uncompressed response should use chunked transfer, headers received: ' . json_encode($response['headers'], JSON_PRETTY_PRINT));
|
||||
$this->assertArrayNotHasKey('content-length', $response['headers'], 'Uncompressed response should not send content length when chunked.');
|
||||
|
||||
if ($this->endpoint !== 'http://appwrite/v1'){
|
||||
$this->assertEquals('chunked', $response['headers']['transfer-encoding'] ?? null, 'Uncompressed response should use chunked transfer, headers received: ' . json_encode($response['headers'], JSON_PRETTY_PRINT));
|
||||
$this->assertArrayNotHasKey('content-length', $response['headers'], 'Uncompressed response should not send content length when chunked.');
|
||||
}
|
||||
|
||||
$this->assertArrayHasKey('longValue', $response['body'], 'Prefs payload should expose longValue at the top level, body received: ' . json_encode($response['body'], JSON_PRETTY_PRINT));
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@ abstract class Scope extends TestCase
|
||||
public const REQUEST_TYPE_SMS = 'sms';
|
||||
|
||||
protected ?Client $client = null;
|
||||
//protected string $endpoint = 'http://appwrite.test/v1';
|
||||
//protected string $endpoint = 'http://localhost/v1';
|
||||
protected string $webEndpoint = 'http://appwrite.test/v1';
|
||||
protected string $endpoint = 'http://appwrite/v1';
|
||||
|
||||
protected function setUp(): void
|
||||
|
||||
@@ -24,14 +24,6 @@ trait MigrationsBase
|
||||
*/
|
||||
protected static array $destinationProject = [];
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEndPoint():string
|
||||
{
|
||||
return 'http://appwrite.test/v1';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $fresh
|
||||
* @return array
|
||||
@@ -97,7 +89,7 @@ trait MigrationsBase
|
||||
{
|
||||
$response = $this->performMigrationSync([
|
||||
'resources' => Appwrite::getSupportedResources(),
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -134,7 +126,7 @@ trait MigrationsBase
|
||||
'resources' => [
|
||||
Resource::TYPE_USER,
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -196,7 +188,7 @@ trait MigrationsBase
|
||||
'resources' => [
|
||||
Resource::TYPE_USER,
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -285,7 +277,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_TEAM,
|
||||
Resource::TYPE_MEMBERSHIP,
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -401,7 +393,7 @@ trait MigrationsBase
|
||||
'resources' => [
|
||||
Resource::TYPE_DATABASE,
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -492,7 +484,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_TABLE,
|
||||
Resource::TYPE_COLUMN,
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -579,7 +571,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_COLUMN,
|
||||
Resource::TYPE_ROW,
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -659,7 +651,7 @@ trait MigrationsBase
|
||||
'resources' => [
|
||||
Resource::TYPE_BUCKET
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -755,7 +747,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_BUCKET,
|
||||
Resource::TYPE_FILE
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -826,7 +818,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_FUNCTION,
|
||||
Resource::TYPE_DEPLOYMENT
|
||||
],
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -1127,7 +1119,7 @@ trait MigrationsBase
|
||||
// all data exists, pass.
|
||||
$migration = $this->performCsvMigration(
|
||||
[
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'fileId' => $fileIds['default'],
|
||||
'bucketId' => $bucketIds['default'],
|
||||
'resourceId' => $databaseId . ':' . $tableId,
|
||||
@@ -1169,7 +1161,7 @@ trait MigrationsBase
|
||||
// all data exists and includes internals, pass.
|
||||
$migration = $this->performCsvMigration(
|
||||
[
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'endpoint' => $this->webEndpoint,
|
||||
'fileId' => $fileIds['documents-internals'],
|
||||
'bucketId' => $bucketIds['documents-internals'],
|
||||
'resourceId' => $databaseId . ':' . $tableId,
|
||||
|
||||
Reference in New Issue
Block a user