mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Improve ci/cd logging
This commit is contained in:
@@ -48,8 +48,23 @@ trait SitesBase
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey'],
|
||||
]));
|
||||
|
||||
if ($deployment['body']['status'] === 'failed') {
|
||||
$this->fail('Deployment failed: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
Console::execute("docker inspect openruntimes-executor --format='{{.State.ExitCode}}'", '', $this->stdout, $this->stderr);
|
||||
if ($this->stdout !== '0') {
|
||||
$msg = 'Executor has a problem: ' . $this->stderr . ' (' . $this->stdout . '), current status: ';
|
||||
|
||||
Console::execute("docker compose logs openruntimes-executor", '', $this->stdout, $this->stderr);
|
||||
$msg .= $this->stdout . ' (' . $this->stderr . ')';
|
||||
|
||||
$this->fail($msg . json_encode($deployment['body'], JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
$this->assertEquals('ready', $deployment['body']['status'], 'Deployment status is not ready, deployment: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT));
|
||||
}, 150000, 500);
|
||||
}, 300000, 500);
|
||||
|
||||
// Not === so multipart/form-data works fine too
|
||||
if (($params['activate'] ?? false) == true) {
|
||||
|
||||
@@ -405,8 +405,10 @@ class SitesCustomServerTest extends Scope
|
||||
]);
|
||||
$this->assertNotEmpty($deploymentId);
|
||||
|
||||
$site = $this->getSite($siteId);
|
||||
$this->assertEquals('ssr', $site['body']['adapter']);
|
||||
$this->assertEventually(function () use ($siteId, &$site) {
|
||||
$site = $this->getSite($siteId);
|
||||
$this->assertEquals('ssr', $site['body']['adapter']);
|
||||
});
|
||||
|
||||
$proxyClient = new Client();
|
||||
$proxyClient->setEndpoint('http://' . $domain);
|
||||
|
||||
Reference in New Issue
Block a user