mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
debug: ci docker logs
This commit is contained in:
@@ -147,9 +147,17 @@ jobs:
|
||||
- name: Run ${{matrix.service}} Tests
|
||||
run: docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.service}} --debug
|
||||
|
||||
- name: Log docker-compose logs
|
||||
run: docker compose logs appwrite
|
||||
if: failure()
|
||||
|
||||
- name: Run ${{matrix.service}} Shared Tables Tests
|
||||
run: _APP_DATABASE_SHARED_TABLES=database_db_main docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.service}} --debug
|
||||
|
||||
- name: Log docker-compose logs
|
||||
run: docker compose logs appwrite
|
||||
if: failure()
|
||||
|
||||
benchmarking:
|
||||
name: Benchmark
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -250,28 +250,21 @@ class FunctionsCustomClientTest extends Scope
|
||||
'activate' => true
|
||||
]);
|
||||
|
||||
try {
|
||||
$execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'x-appwrite-event' => "OVERRIDDEN",
|
||||
'x-appwrite-trigger' => "OVERRIDDEN",
|
||||
'x-appwrite-user-id' => "OVERRIDDEN",
|
||||
'x-appwrite-user-jwt' => "OVERRIDDEN",
|
||||
]);
|
||||
|
||||
$output = json_decode($execution['body']['responseBody'], true);
|
||||
$this->assertNotEquals('OVERRIDDEN', $output['APPWRITE_FUNCTION_JWT']);
|
||||
$this->assertNotEquals('OVERRIDDEN', $output['APPWRITE_FUNCTION_EVENT']);
|
||||
$this->assertNotEquals('OVERRIDDEN', $output['APPWRITE_FUNCTION_TRIGGER']);
|
||||
$this->assertNotEquals('OVERRIDDEN', $output['APPWRITE_FUNCTION_USER_ID']);
|
||||
} catch (\Exception $e) {
|
||||
// output docker logs
|
||||
$out = '';
|
||||
Console::execute('docker compose logs appwrite', '', $out, $out);
|
||||
fwrite(STDOUT, print_r($out, true));
|
||||
}
|
||||
$execution = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/executions', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'x-appwrite-event' => "OVERRIDDEN",
|
||||
'x-appwrite-trigger' => "OVERRIDDEN",
|
||||
'x-appwrite-user-id' => "OVERRIDDEN",
|
||||
'x-appwrite-user-jwt' => "OVERRIDDEN",
|
||||
]);
|
||||
|
||||
$output = json_decode($execution['body']['responseBody'], true);
|
||||
$this->assertNotEquals('OVERRIDDEN', $output['APPWRITE_FUNCTION_JWT']);
|
||||
$this->assertNotEquals('OVERRIDDEN', $output['APPWRITE_FUNCTION_EVENT']);
|
||||
$this->assertNotEquals('OVERRIDDEN', $output['APPWRITE_FUNCTION_TRIGGER']);
|
||||
$this->assertNotEquals('OVERRIDDEN', $output['APPWRITE_FUNCTION_USER_ID']);
|
||||
|
||||
|
||||
$this->cleanupFunction($functionId);
|
||||
|
||||
Reference in New Issue
Block a user