mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Fix failing tests
This commit is contained in:
1 parent
a35e0b6a2b
commit
732c4cc1ab
1 file changed
+7
-3
@@ -25,10 +25,14 @@ final class VCSGiteaConsoleClientTest extends Scope
|
||||
public function testCreateInstallation(): void
|
||||
{
|
||||
$projectId = $this->getProject()['$id'];
|
||||
$consoleUrl = 'http://localhost/console/project-default-' . $projectId . '/settings/git-installations';
|
||||
|
||||
$authorize = $this->client->call(Client::METHOD_GET, '/vcs/gitea/authorize', array_merge([
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), [], true, false);
|
||||
], $this->getHeaders()), [
|
||||
'success' => $consoleUrl,
|
||||
'failure' => $consoleUrl,
|
||||
], true, false);
|
||||
|
||||
$this->assertEquals(301, $authorize['headers']['status-code']);
|
||||
|
||||
@@ -95,7 +99,7 @@ final class VCSGiteaConsoleClientTest extends Scope
|
||||
], true, false);
|
||||
|
||||
$this->assertEquals(301, $callback['headers']['status-code']);
|
||||
$this->assertStringContainsString('git-installations', (string) ($callback['headers']['location'] ?? ''));
|
||||
$this->assertEquals($consoleUrl, $callback['headers']['location'] ?? '');
|
||||
|
||||
$installations = $this->client->call(Client::METHOD_GET, '/vcs/installations', array_merge([
|
||||
'x-appwrite-project' => $projectId,
|
||||
@@ -116,7 +120,7 @@ final class VCSGiteaConsoleClientTest extends Scope
|
||||
$this->assertNotEmpty($installation['$id']);
|
||||
$this->assertEquals('gitea', $installation['provider']);
|
||||
$this->assertEquals(self::GITEA_USERNAME, $installation['organization']);
|
||||
$this->assertTrue($installation['personal']);
|
||||
$this->assertNotEmpty($installation['providerInstallationId']);
|
||||
}
|
||||
|
||||
// Client does not persist cookies between calls, so carry them manually and never follow redirects
|
||||
|
||||
Reference in new issue
Block a user