fix(upgrade): handle status polling after older release restarts

Treat recovered health checks and polling errors as successful completion when older target releases cannot report upgrade status.
This commit is contained in:
Andras Bacsai
2026-08-13 14:30:47 +02:00
parent 6492d08136
commit 8576214a6d
3 changed files with 43 additions and 1 deletions
+10
View File
@@ -139,6 +139,16 @@ it('uses the public health endpoint only for liveness during an upgrade', functi
->not->toContain('response.headers.get');
});
it('finishes after health recovers from observed downtime for older target releases', function () {
$upgradeView = file_get_contents(__DIR__.'/../../resources/views/livewire/upgrade.blade.php');
expect($upgradeView)
->toContain("data.status === 'none' && this.instanceWentDown")
->toContain('if (this.instanceWentDown) {')
->toContain('this.showSuccess();')
->toContain('return;');
});
it('starts the upgrade after the Livewire response so status polling is not blocked', function () {
$upgradeComponent = file_get_contents(__DIR__.'/../../app/Livewire/Upgrade.php');