mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix tests
This commit is contained in:
@@ -151,10 +151,8 @@ jobs:
|
||||
- name: Failure Logs
|
||||
if: failure()
|
||||
run: |
|
||||
echo "=== Appwrite Worker Builds Logs ==="
|
||||
docker compose logs appwrite-worker-builds
|
||||
echo "=== OpenRuntimes Executor Logs ==="
|
||||
docker compose logs openruntimes-executor
|
||||
echo "=== Appwrite Logs ==="
|
||||
docker compose logs
|
||||
|
||||
e2e_service_test:
|
||||
name: E2E Service Test
|
||||
|
||||
@@ -232,7 +232,7 @@ $register->set('pools', function () {
|
||||
},
|
||||
'mongodb' => function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase, $dsn) {
|
||||
try {
|
||||
$mongo = new MongoClient($dsnDatabase, $dsnHost, (int)$dsnPort, $dsnUser, $dsnPass, true);
|
||||
$mongo = new MongoClient($dsnDatabase, $dsnHost, (int)$dsnPort, $dsnUser, $dsnPass, false);
|
||||
@$mongo->connect();
|
||||
|
||||
return $mongo;
|
||||
@@ -310,7 +310,7 @@ $register->set('db', function () {
|
||||
case 'mongodb':
|
||||
|
||||
try {
|
||||
$mongo = new MongoClient($dbScheme, $dbHost, (int)$dbPort, $dbUser, $dbPass, true);
|
||||
$mongo = new MongoClient($dbScheme, $dbHost, (int)$dbPort, $dbUser, $dbPass, false);
|
||||
@$mongo->connect();
|
||||
|
||||
return $mongo;
|
||||
|
||||
@@ -89,8 +89,6 @@ services:
|
||||
- ./public:/usr/src/code/public
|
||||
- ./src:/usr/src/code/src
|
||||
- ./dev:/usr/src/code/dev
|
||||
- ./vendor/utopia-php/mongo/src:/usr/src/code/vendor/utopia-php/mongo/src
|
||||
- ./vendor/utopia-php/database/src:/usr/src/code/vendor/utopia-php/database/src
|
||||
|
||||
depends_on:
|
||||
- ${_APP_DB_HOST:-mongodb}
|
||||
@@ -103,7 +101,6 @@ services:
|
||||
environment:
|
||||
- _APP_ENV
|
||||
- _APP_EDITION
|
||||
- _APP_DB_ADAPTER=mariadb
|
||||
- _APP_WORKER_PER_CORE
|
||||
- _APP_LOCALE
|
||||
- _APP_COMPRESSION_MIN_SIZE_BYTES
|
||||
|
||||
@@ -1503,8 +1503,8 @@ trait DatabasesBase
|
||||
'orders' => [Database::ORDER_DESC],
|
||||
]);
|
||||
|
||||
$this->assertEquals(202, $create['headers']['status-code']);
|
||||
|
||||
$this->assertEquals(202, $create['headers']['status-code']);
|
||||
|
||||
$index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/collections/{$collectionId}/indexes/lengthOverrideTestIndex", [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
@@ -4234,7 +4234,7 @@ trait DatabasesBase
|
||||
public function testUniqueIndexDuplicate(array $data): array
|
||||
{
|
||||
$databaseId = $data['databaseId'];
|
||||
|
||||
|
||||
$uniqueIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
@@ -4245,9 +4245,9 @@ trait DatabasesBase
|
||||
'attributes' => ['title'],
|
||||
'orders' => [Database::ORDER_DESC],
|
||||
]);
|
||||
|
||||
$this->assertEquals(202, $uniqueIndex['headers']['status-code']);
|
||||
|
||||
|
||||
$this->assertEquals(202, $uniqueIndex['headers']['status-code']);
|
||||
|
||||
sleep(2);
|
||||
|
||||
// test for failure
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,6 @@ use Utopia\Database\Database;
|
||||
use Utopia\Database\Helpers\ID;
|
||||
use Utopia\Database\Helpers\Permission;
|
||||
use Utopia\Database\Helpers\Role;
|
||||
use Utopia\System\System;
|
||||
|
||||
class DatabasesCustomClientTest extends Scope
|
||||
{
|
||||
|
||||
@@ -3006,7 +3006,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
$this->assertContains('users.write', $response['body']['scopes']);
|
||||
$this->assertContains('collections.read', $response['body']['scopes']);
|
||||
$this->assertContains('tables.read', $response['body']['scopes']);
|
||||
//Why are we checking 3 scopes if there are 4 i uodated it to 4?
|
||||
//Why are we checking 3 scopes if there are 4 i uodated it to 4?
|
||||
$this->assertCount(4, $response['body']['scopes']);
|
||||
$this->assertArrayHasKey('sdks', $response['body']);
|
||||
$this->assertEmpty($response['body']['sdks']);
|
||||
|
||||
@@ -8,7 +8,6 @@ use Tests\E2E\Client;
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\Database\Helpers\ID;
|
||||
use Utopia\Database\Query;
|
||||
use Utopia\System\System;
|
||||
|
||||
trait UsersBase
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user