feat(auditlog): NotifyDeliver rows carry the originating ParentExecutionId
This commit is contained in:
@@ -36,6 +36,21 @@ public class NotificationEntityTests
|
||||
Assert.Equal(executionId, n.OriginExecutionId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OriginParentExecutionId_DefaultsToNull_AndIsSettable()
|
||||
{
|
||||
// Audit Log ParentExecutionId: OriginParentExecutionId carries the
|
||||
// routed run's parent ExecutionId from the site so the dispatcher can
|
||||
// echo it onto NotifyDeliver rows. Null for non-routed runs, or for
|
||||
// notifications submitted before the column existed.
|
||||
var n = new Notification("id-1", NotificationType.Email, "ops-team", "subj", "body", "SiteA");
|
||||
Assert.Null(n.OriginParentExecutionId);
|
||||
|
||||
var parentExecutionId = Guid.NewGuid();
|
||||
n.OriginParentExecutionId = parentExecutionId;
|
||||
Assert.Equal(parentExecutionId, n.OriginParentExecutionId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Constructor_NullArguments_Throw()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user