fix(auditlog): assert Forwarded state in push integration test; tidy docs and Host wiring

This commit is contained in:
Joseph Doherty
2026-05-21 03:46:40 -04:00
parent de5280d1c7
commit 6f59a1b546
5 changed files with 88 additions and 39 deletions

View File

@@ -185,9 +185,12 @@ public class SiteAuditPushFlowTests : TestKit
// Central received and persisted the row.
Assert.Contains(centralRepo.Rows, r => r.EventId == eventId);
// The site row is no longer Pending.
var stillPending = await writer.ReadPendingAsync(256, CancellationToken.None);
Assert.DoesNotContain(stillPending, r => r.EventId == eventId);
// The site row reached AuditForwardState.Forwarded specifically —
// not merely "no longer Pending" (a Reconciled row would also leave
// ReadPendingAsync, so we assert the positive Forwarded state).
var forwarded = await writer.ReadForwardedAsync(256, CancellationToken.None);
var row = Assert.Single(forwarded, r => r.EventId == eventId);
Assert.Equal(AuditForwardState.Forwarded, row.ForwardState);
}, TimeSpan.FromSeconds(10), TimeSpan.FromMilliseconds(250));
// The central-persisted row carries the central-stamped IngestedAtUtc.