fix(deployment): pending-updates tick uses a slim instance projection, hash-only flatten, one untracked mismatch snapshot read and a per-tick secret lookup memo (review 2026-10-21 04/P2)
This commit is contained in:
@@ -299,4 +299,28 @@ public class ReconcileRepositoryTests : IDisposable
|
||||
Assert.NotNull(await _repository.GetPendingDeploymentByIdAsync("dep-good"));
|
||||
Assert.Null(await _repository.GetPendingDeploymentByIdAsync("dep-gone"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// review 2026-10-21 04/P2: the pending-updates instance list is a slim, untracked projection
|
||||
/// of the deployed (non-NotDeployed) instances.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task GetDeployedInstanceSummaries_ExcludesNotDeployed_Untracked()
|
||||
{
|
||||
var siteId = await SeedSiteAsync("SiteSlim");
|
||||
var enabled = await SeedInstanceAsync("SlimEnabled", siteId, InstanceState.Enabled);
|
||||
var disabled = await SeedInstanceAsync("SlimDisabled", siteId, InstanceState.Disabled);
|
||||
await SeedInstanceAsync("SlimNotDeployed", siteId, InstanceState.NotDeployed);
|
||||
_context.ChangeTracker.Clear();
|
||||
|
||||
var summaries = await _repository.GetDeployedInstanceSummariesAsync();
|
||||
|
||||
Assert.Equal(new[] { enabled, disabled }.Order(), summaries.Select(i => i.Id).Order());
|
||||
var e = summaries.Single(i => i.Id == enabled);
|
||||
Assert.Equal(siteId, e.SiteId);
|
||||
Assert.Equal(InstanceState.Enabled, e.State);
|
||||
Assert.Equal("SlimEnabled", e.UniqueName);
|
||||
Assert.Empty(_context.ChangeTracker.Entries<Instance>());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user