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.
25 lines
520 B
PHP
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('');
|
|
});
|