Fix tests

This commit is contained in:
Matej Bačo
2025-02-24 18:42:20 +01:00
parent 427e781b5b
commit 40beecdddc
7 changed files with 22 additions and 30 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ _APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=traefik
_APP_DOMAIN_FUNCTIONS=functions.localhost
_APP_DOMAIN_SITES=sites.localhost
_APP_DOMAIN_TARGET=localhost
_APP_DOMAIN_TARGET=test.appwrite.io
_APP_RULES_FORMAT=md5
_APP_REDIS_HOST=redis
_APP_REDIS_PORT=6379
+1 -1
View File
@@ -288,7 +288,7 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
'domain' => $domain,
'type' => 'deployment',
'value' => $deployment->getId(),
'automation' => 'commit=' . $providerBranch,
'automation' => 'commit=' . $providerCommitHash,
'status' => 'verified',
'certificateId' => '',
]))
+1 -7
View File
@@ -1289,13 +1289,7 @@ App::get('/v1/ping')
App::wildcard()
->groups(['api'])
->label('scope', 'global')
->inject('utopia')
->action(function (App $utopia) {
$handeledByRouter = $utopia->getRoute()?->getLabel('router', false);
if ($handeledByRouter === true) {
return;
}
->action(function () {
throw new AppwriteException(AppwriteException::GENERAL_ROUTE_NOT_FOUND);
});
+1 -1
View File
@@ -55,7 +55,7 @@
"utopia-php/database": "0.59.0",
"utopia-php/domains": "0.5.*",
"utopia-php/dsn": "0.2.1",
"utopia-php/framework": "dev-fix-prevent-duplicate-compression as 0.33.99",
"utopia-php/framework": "0.33.*",
"utopia-php/fetch": "0.3.*",
"utopia-php/image": "0.7.*",
"utopia-php/locale": "0.4.*",
Generated
+9 -18
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "236b24287cd5bdcf705df586f12c560c",
"content-hash": "6883b3e81cfb0c5355997def668d5df2",
"packages": [
{
"name": "adhocore/jwt",
@@ -3919,16 +3919,16 @@
},
{
"name": "utopia-php/framework",
"version": "dev-fix-prevent-duplicate-compression",
"version": "0.33.16",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/http.git",
"reference": "a1efe3e10038afe4109af833ce7a25a8ec4b5ed2"
"reference": "e91d4c560d1b809e25faa63d564fef034363b50f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/http/zipball/a1efe3e10038afe4109af833ce7a25a8ec4b5ed2",
"reference": "a1efe3e10038afe4109af833ce7a25a8ec4b5ed2",
"url": "https://api.github.com/repos/utopia-php/http/zipball/e91d4c560d1b809e25faa63d564fef034363b50f",
"reference": "e91d4c560d1b809e25faa63d564fef034363b50f",
"shasum": ""
},
"require": {
@@ -3960,9 +3960,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/http/issues",
"source": "https://github.com/utopia-php/http/tree/fix-prevent-duplicate-compression"
"source": "https://github.com/utopia-php/http/tree/0.33.16"
},
"time": "2025-02-03T12:02:35+00:00"
"time": "2025-01-16T15:58:50+00:00"
},
{
"name": "utopia-php/image",
@@ -8804,18 +8804,9 @@
"time": "2024-03-07T20:33:40+00:00"
}
],
"aliases": [
{
"package": "utopia-php/framework",
"version": "dev-fix-prevent-duplicate-compression",
"alias": "0.33.99",
"alias_normalized": "0.33.99.0"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"utopia-php/framework": 20
},
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
+1 -1
View File
@@ -6,7 +6,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="true"
stopOnFailure="false"
>
<extensions>
<extension class="Appwrite\Tests\TestHook" />
@@ -151,7 +151,7 @@ class ProxyCustomServerTest extends Scope
$this->cleanupRule($ruleId);
}
public function testCreatSiteRule(): void
public function testCreateSiteRule(): void
{
$domain = \uniqid() . '-site.custom.localhost';
@@ -250,6 +250,13 @@ class ProxyCustomServerTest extends Scope
public function testListRules()
{
$rules = $this->listRules();
$this->assertEquals(200, $rules['headers']['status-code']);
foreach($rules['body']['rules'] as $rule) {
$rule = $this->deleteRule($rule['$id']);
$this->assertEquals(204, $rule['headers']['status-code']);
}
$rules = $this->listRules();
$this->assertEquals(200, $rules['headers']['status-code']);
$this->assertEquals(0, $rules['body']['total']);