mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
localhost
This commit is contained in:
@@ -18,13 +18,13 @@ abstract class Scope extends TestCase
|
||||
public const REQUEST_TYPE_SMS = 'sms';
|
||||
|
||||
protected ?Client $client = null;
|
||||
protected string $endpoint = 'http://appwrite.test/v1';
|
||||
protected string $localhost = 'http://localhost/v1';
|
||||
//protected string $endpoint = 'http://appwrite.test/v1';
|
||||
protected string $endpoint = 'http://localhost/v1';
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->client = new Client();
|
||||
$this->client->setEndpoint($this->localhost);
|
||||
$this->client->setEndpoint($this->endpoint);
|
||||
|
||||
$format = System::getEnv('_APP_E2E_RESPONSE_FORMAT');
|
||||
if (!empty($format)) {
|
||||
|
||||
@@ -24,6 +24,14 @@ trait MigrationsBase
|
||||
*/
|
||||
protected static array $destinationProject = [];
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEndPoint():string
|
||||
{
|
||||
return 'http://appwrite.test/v1';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $fresh
|
||||
* @return array
|
||||
@@ -89,7 +97,7 @@ trait MigrationsBase
|
||||
{
|
||||
$response = $this->performMigrationSync([
|
||||
'resources' => Appwrite::getSupportedResources(),
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -126,7 +134,7 @@ trait MigrationsBase
|
||||
'resources' => [
|
||||
Resource::TYPE_USER,
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -188,7 +196,7 @@ trait MigrationsBase
|
||||
'resources' => [
|
||||
Resource::TYPE_USER,
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -277,7 +285,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_TEAM,
|
||||
Resource::TYPE_MEMBERSHIP,
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -393,7 +401,7 @@ trait MigrationsBase
|
||||
'resources' => [
|
||||
Resource::TYPE_DATABASE,
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -484,7 +492,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_TABLE,
|
||||
Resource::TYPE_COLUMN,
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -571,7 +579,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_COLUMN,
|
||||
Resource::TYPE_ROW,
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -651,7 +659,7 @@ trait MigrationsBase
|
||||
'resources' => [
|
||||
Resource::TYPE_BUCKET
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -747,7 +755,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_BUCKET,
|
||||
Resource::TYPE_FILE
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -818,7 +826,7 @@ trait MigrationsBase
|
||||
Resource::TYPE_FUNCTION,
|
||||
Resource::TYPE_DEPLOYMENT
|
||||
],
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'projectId' => $this->getProject()['$id'],
|
||||
'apiKey' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
@@ -1119,7 +1127,7 @@ trait MigrationsBase
|
||||
// all data exists, pass.
|
||||
$migration = $this->performCsvMigration(
|
||||
[
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'fileId' => $fileIds['default'],
|
||||
'bucketId' => $bucketIds['default'],
|
||||
'resourceId' => $databaseId . ':' . $tableId,
|
||||
@@ -1161,7 +1169,7 @@ trait MigrationsBase
|
||||
// all data exists and includes internals, pass.
|
||||
$migration = $this->performCsvMigration(
|
||||
[
|
||||
'endpoint' => $this->endpoint,
|
||||
'endpoint' => $this->getEndPoint(),
|
||||
'fileId' => $fileIds['documents-internals'],
|
||||
'bucketId' => $bucketIds['documents-internals'],
|
||||
'resourceId' => $databaseId . ':' . $tableId,
|
||||
|
||||
Reference in New Issue
Block a user