Files
api/services/nginx/app/tests/Api/WorkerStatusApiTest.php
T
Jeppe Bundgaard d52ceb8513 Add robust release update and API health checks
This commit introduces a release update mechanism, including candidate detection, asset pre-downloading, and installation workflows with proper state management. Additionally, it implements API health checks both for successful and failure scenarios and adds related unit and e2e tests for enhanced reliability.
2026-05-27 13:24:15 +02:00

25 lines
520 B
PHP

<?php
declare(strict_types=1);
usesApiSuite();
it('returns the running API commit in worker status', function (): void {
api_test_covers('GET /worker/status', 'happy');
$response = api_client()->get('/worker/status');
$response
->assertStatus(200)
->assertEnvelope()
->assertSuccess();
expect($response->data())
->toBeArray()
->toHaveKey('api_commit_sha');
expect($response->data()['api_commit_sha'])
->toBeString()
->not->toBe('');
});