mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
fix(upgrade): use authenticated status polling after restart
Remove the version header from the health endpoint and use upgrade status polling to determine completion.
This commit is contained in:
1 parent
1932673c22
commit
6492d08136
4 files changed
+38
-80
No files matched your search
@@ -3,20 +3,20 @@
|
||||
use App\Http\Controllers\Api\OtherController;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
it('adds the running version header on the healthcheck response', function () {
|
||||
it('does not expose the running version on the healthcheck response', function () {
|
||||
config(['constants.coolify.version' => '4.3.1']);
|
||||
|
||||
$response = (new OtherController)->healthcheck(Request::create('/api/health', 'GET'));
|
||||
|
||||
expect($response->getContent())->toBe('OK')
|
||||
->and($response->headers->get('X-Coolify-Version'))->toBe('4.3.1');
|
||||
->and($response->headers->has('X-Coolify-Version'))->toBeFalse();
|
||||
});
|
||||
|
||||
it('exposes the running Coolify version on the public health endpoint', function () {
|
||||
it('does not expose the running Coolify version on the public health endpoint', function () {
|
||||
config(['constants.coolify.version' => '4.3.1']);
|
||||
|
||||
$this->get('/api/health')
|
||||
->assertSuccessful()
|
||||
->assertSee('OK')
|
||||
->assertHeader('X-Coolify-Version', '4.3.1');
|
||||
->assertHeaderMissing('X-Coolify-Version');
|
||||
});
|
||||
Reference in new issue
Block a user