feat: owner review 2 phase 5a: workspace and projects with a local home #14
@@ -252,10 +252,12 @@ public abstract class WorkspaceRecoveryTests(TestContext context) : DatabaseTest
|
|||||||
Assert.Equal(WorkspaceState.Conflict, (await three.ResolveAsync(id, forgetful, ConflictChoice.KeepMine, cancellationToken: fx.Ct)).Status.State);
|
Assert.Equal(WorkspaceState.Conflict, (await three.ResolveAsync(id, forgetful, ConflictChoice.KeepMine, cancellationToken: fx.Ct)).Status.State);
|
||||||
Assert.Equal(WorkspaceState.Conflict, (await three.ResolveAsync(id, forgetful, ConflictChoice.TakeServer, cancellationToken: fx.Ct)).Status.State);
|
Assert.Equal(WorkspaceState.Conflict, (await three.ResolveAsync(id, forgetful, ConflictChoice.TakeServer, cancellationToken: fx.Ct)).Status.State);
|
||||||
Assert.Equal(recorded.TheirsVersionId, project.ReadSync().Conflict!.TheirsVersionId);
|
Assert.Equal(recorded.TheirsVersionId, project.ReadSync().Conflict!.TheirsVersionId);
|
||||||
Assert.Equal("bright", three.Unpushed(id)[0].Note);
|
// Taking the server's saves nothing first, so the refused take left the versions as they were.
|
||||||
|
Assert.Equal("bright", three.Unpushed(id).Single().Note);
|
||||||
|
|
||||||
// Back as it was, the home settles it as the user chooses.
|
// Back as it was, the home settles it as the user chooses; the unsaved stack change stays in the working state.
|
||||||
await three.ResolveAsync(id, fx.Home, ConflictChoice.KeepMine, cancellationToken: fx.Ct);
|
Assert.True((await three.ResolveAsync(id, fx.Home, ConflictChoice.KeepMine, cancellationToken: fx.Ct)).Status.Modified);
|
||||||
|
await three.CommitAsync(id, cancellationToken: fx.Ct);
|
||||||
Assert.Equal(WorkspaceState.InSync, (await three.PushAsync(id, fx.Home, fx.Ct)).Status.State);
|
Assert.Equal(WorkspaceState.InSync, (await three.PushAsync(id, fx.Home, fx.Ct)).Status.State);
|
||||||
var head = Settings(await fx.Home.HeadAsync(id, fx.Ct));
|
var head = Settings(await fx.Home.HeadAsync(id, fx.Ct));
|
||||||
Assert.Equal((2, StackSetting.StarTrails), (head.Exposure.ExposureOffsetEv, head.Stack.Mode));
|
Assert.Equal((2, StackSetting.StarTrails), (head.Exposure.ExposureOffsetEv, head.Stack.Mode));
|
||||||
|
|||||||
Reference in new issue
Block a user