fix(ci): make release gates portable and deterministic
This commit is contained in:
parent
af9327a17b
commit
0c699240e0
4 changed files with 25 additions and 15 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue