Fix failing tests

This commit is contained in:
Matej Bačo
2025-04-01 15:29:07 +02:00
parent 8a2ec0dcd7
commit d87c67eecb
8 changed files with 15 additions and 5 deletions
@@ -24,7 +24,7 @@ class ConsoleConsoleClientTest extends Scope
], $this->getHeaders()));
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertCount(10, $response['body']);
$this->assertCount(11, $response['body']);
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET']);
$this->assertIsInt($response['body']['_APP_STORAGE_LIMIT']);
$this->assertIsInt($response['body']['_APP_COMPUTE_SIZE_LIMIT']);
@@ -33,6 +33,7 @@ class ConsoleConsoleClientTest extends Scope
$this->assertIsBool($response['body']['_APP_VCS_ENABLED']);
$this->assertIsBool($response['body']['_APP_ASSISTANT_ENABLED']);
$this->assertIsString($response['body']['_APP_DOMAIN_SITES']);
$this->assertIsString($response['body']['_APP_DOMAIN_FUNCTIONS']);
$this->assertIsString($response['body']['_APP_OPTIONS_FORCE_HTTPS']);
$this->assertIsString($response['body']['_APP_DOMAINS_NAMESERVERS']);
// When adding new keys, dont forget to update count a few lines above
@@ -321,7 +321,16 @@ class FunctionsCustomClientTest extends Scope
$this->assertContains($template['useCases'][0], ['starter', 'ai']);
}
$this->assertArrayHasKey('runtimes', $templates['body']['templates'][0]);
$this->assertContains('bun-1.0', array_column($templates['body']['templates'][0]['runtimes'], 'name'));
foreach ($templates['body']['templates'] as $template) {
$this->assertThat(
\array_column($template['runtimes'], 'name'),
$this->logicalOr(
$this->containsEqual('bun-1.0'),
$this->containsEqual('dart-2.16'),
),
);
}
// List templates with pagination and filters
$templates = $this->client->call(Client::METHOD_GET, '/functions/templates', array_merge([
+1 -1
View File
@@ -134,7 +134,7 @@ class AvatarsTest extends Scope
'x-appwrite-project' => $projectId,
], $this->getHeaders()), $graphQLPayload);
$this->assertEquals(29428, \strlen($qrCode['body']));
$this->assertEquals(9169, \strlen($qrCode['body']));
return $qrCode['body'];
}
@@ -346,7 +346,7 @@ class ProxyCustomServerTest extends Scope
$ruleId = $rule['body']['$id'];
$rule = $this->updateRuleVerification($ruleId);
$this->assertEquals(401, $rule['headers']['status-code']);
$this->assertEquals(400, $rule['headers']['status-code']);
$this->cleanupRule($ruleId);
}
@@ -1377,7 +1377,7 @@ class SitesCustomServerTest extends Scope
$frameworks = $this->client->call(Client::METHOD_GET, '/sites/frameworks', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
]));
$this->assertEquals(200, $frameworks['headers']['status-code']);
$this->assertGreaterThan(0, $frameworks['body']['total']);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB