fix(reconcile): expiry-aware pending staging — expired rows no longer block self-heal
This commit is contained in:
@@ -141,7 +141,7 @@ public class ReconcileServiceTests
|
||||
|
||||
// The existing pending row for inst-C carries the FIRST node's deploymentId + token.
|
||||
var nowUtc = DateTimeOffset.UtcNow;
|
||||
_deploymentRepo.GetPendingDeploymentByInstanceIdAsync(3, Arg.Any<CancellationToken>())
|
||||
_deploymentRepo.GetPendingDeploymentByInstanceIdAsync(3, Arg.Any<DateTimeOffset?>(), Arg.Any<CancellationToken>())
|
||||
.Returns(new PendingDeployment(
|
||||
"dep-C-existing", 3, "rev3-existing", "{\"cfg\":\"inst-C\"}",
|
||||
"tok-C-existing", nowUtc, nowUtc.AddMinutes(5)));
|
||||
@@ -182,7 +182,7 @@ public class ReconcileServiceTests
|
||||
.Returns(false);
|
||||
|
||||
// The pending row was purged between the stage attempt and the read.
|
||||
_deploymentRepo.GetPendingDeploymentByInstanceIdAsync(3, Arg.Any<CancellationToken>())
|
||||
_deploymentRepo.GetPendingDeploymentByInstanceIdAsync(3, Arg.Any<DateTimeOffset?>(), Arg.Any<CancellationToken>())
|
||||
.Returns((PendingDeployment?)null);
|
||||
|
||||
var response = await CreateService().ReconcileAsync(Request(/* empty local inventory */));
|
||||
|
||||
Reference in New Issue
Block a user