fix(launcher): harden updater crash recovery

This commit is contained in:
Erik 2026-08-14 23:12:15 +02:00
parent 2d2a5b5046
commit 1955ca8ab5
27 changed files with 2714 additions and 544 deletions

View file

@ -30,7 +30,8 @@ public sealed class LauncherUpdaterIntegrationTests : IDisposable
byte[] launcher = UpdateTestData.LauncherZip(_rid, "release-2");
ConfigureRelease(server, "2.0.0", "1.0.0", _rid, client, launcher);
using var http = new HttpClient();
using var source = new ReleaseManifestClient(http, server.UriFor("manifest.json"));
using var source = ReleaseManifestClient.CreateLoopbackFixture(
server.UriFor("manifest.json"));
var versions = new ClientVersionStore(_paths);
var updater = new LauncherUpdater(
source,
@ -74,7 +75,8 @@ public sealed class LauncherUpdaterIntegrationTests : IDisposable
byte[] launcher = UpdateTestData.LauncherZip(_rid);
ConfigureRelease(server, "3.0.0", "2.0.0", _rid, client, launcher);
using var http = new HttpClient();
using var source = new ReleaseManifestClient(http, server.UriFor("manifest.json"));
using var source = ReleaseManifestClient.CreateLoopbackFixture(
server.UriFor("manifest.json"));
var versions = new ClientVersionStore(_paths);
var updater = new LauncherUpdater(
source,
@ -108,7 +110,8 @@ public sealed class LauncherUpdaterIntegrationTests : IDisposable
byte[] launcher = UpdateTestData.LauncherZip(_rid);
ConfigureRelease(server, "2.0.0", "1.0.0", _rid, client, launcher);
using var http = new HttpClient();
using var source = new ReleaseManifestClient(http, server.UriFor("manifest.json"));
using var source = ReleaseManifestClient.CreateLoopbackFixture(
server.UriFor("manifest.json"));
var versions = new ClientVersionStore(_paths);
bool running = true;
var updater = new LauncherUpdater(
@ -156,7 +159,8 @@ public sealed class LauncherUpdaterIntegrationTests : IDisposable
launcher),
contentType: "application/json");
using var http = new HttpClient();
using var source = new ReleaseManifestClient(http, server.UriFor("manifest.json"));
using var source = ReleaseManifestClient.CreateLoopbackFixture(
server.UriFor("manifest.json"));
var versions = new ClientVersionStore(_paths);
var updater = new LauncherUpdater(
source,