Resolve merge conflicts

This commit is contained in:
Khushboo Verma
2025-03-27 16:27:26 +05:30
22 changed files with 338 additions and 113 deletions
@@ -2394,6 +2394,43 @@ class SitesCustomServerTest extends Scope
$this->cleanupSite($siteId);
}
public function testDomainForFailedDeloyment(): void
{
$siteId = $this->setupSite([
'siteId' => ID::unique(),
'name' => 'Test Site',
'framework' => 'astro',
'buildRuntime' => 'node-22',
'buildCommand' => 'cd random'
]);
$this->assertNotEmpty($siteId);
$domain = $this->setupSiteDomain($siteId);
$this->assertNotEmpty($domain);
$proxyClient = new Client();
$proxyClient->setEndpoint('http://' . $domain);
$deployment = $this->createDeployment($siteId, [
'code' => $this->packageSite('astro'),
'activate' => true
]);
$this->assertEquals(202, $deployment['headers']['status-code']);
$deploymentId = $deployment['body']['$id'];
$this->assertNotEmpty($deploymentId);
$this->assertEventually(function () use ($siteId, $deploymentId) {
$deployment = $this->getDeployment($siteId, $deploymentId);
$this->assertEquals('failed', $deployment['body']['status'], json_encode($deployment['body'], JSON_PRETTY_PRINT));
}, 100000, 500);
$response = $proxyClient->call(Client::METHOD_GET, '/');
$this->assertStringContainsString('build_failed', $response['body']);
$this->cleanupSite($siteId);
}
public function testPermanentRedirect(): void
{
$siteId = $this->setupSite([