fix(launcher): harden installer transactions
This commit is contained in:
parent
ff6ebb6a6a
commit
3f68895120
21 changed files with 1164 additions and 61 deletions
|
|
@ -23,6 +23,24 @@ public sealed class BakeOutputTransactionTests : IDisposable
|
|||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void StagingPathUsesTheDocumentedLauncherRecoveryContract()
|
||||
{
|
||||
string destination = Path.Combine(_directory, "pak", "acdream.pak");
|
||||
Guid transaction = Guid.Parse("01234567-89ab-cdef-0123-456789abcdef");
|
||||
|
||||
string staging = BakeOutputTransaction.CreateStagingPath(
|
||||
destination,
|
||||
transaction);
|
||||
|
||||
Assert.Equal(
|
||||
Path.Combine(
|
||||
_directory,
|
||||
"pak",
|
||||
".acdream.pak.acdream-bake.0123456789abcdef0123456789abcdef.tmp"),
|
||||
staging);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Publish_ReplacesExistingDestinationOnlyAfterValidation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,6 +5,16 @@ namespace AcDream.Bake.Tests;
|
|||
|
||||
public sealed class BakeProgressCliTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("--help")]
|
||||
[InlineData("-h")]
|
||||
public void HelpIsAZeroDatArgumentProbe(string argument)
|
||||
{
|
||||
Assert.True(BakeCommandLine.IsHelpRequest([argument]));
|
||||
Assert.False(BakeCommandLine.IsHelpRequest([argument, "extra"]));
|
||||
Assert.Contains("--help", BakeCommandLine.Usage, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ProgressJsonFlagIsOptInAndDefaultOutputRemainsInTheDatDirectory()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue