fix(ci): make release gates portable and deterministic
All checks were successful
CI / linux-portable (push) Successful in 3m46s
CI / windows-gate (push) Successful in 6m21s
CI / release (push) Successful in 2m15s

This commit is contained in:
Erik 2026-08-25 19:38:10 +02:00
parent af9327a17b
commit 0c699240e0
4 changed files with 25 additions and 15 deletions

View file

@ -238,11 +238,18 @@ public sealed class PreparedAssetVerificationCacheTests : IDisposable
// Crash shape: the verified package was moved aside and what sits in
// its place is wrong. The cache still describes the ORIGINAL bytes, so
// if recovery trusted it the launcher would accept a bad package.
DateTime verifiedWriteTime = File.GetLastWriteTimeUtc(store.PreparedAssetPath);
string backup = LauncherInstallRecordStore.GetBackupPath(store.PreparedAssetPath);
File.Move(store.PreparedAssetPath, backup);
await File.WriteAllTextAsync(
store.PreparedAssetPath,
new string('z', PackageContent.Length));
File.SetLastWriteTimeUtc(
store.PreparedAssetPath,
verifiedWriteTime.AddMinutes(1));
Assert.NotEqual(
verifiedWriteTime,
File.GetLastWriteTimeUtc(store.PreparedAssetPath));
InstallRecordVerification verification = await store.LoadAndVerifyAsync();