Test a pending delivery whose target is found only on lookup
check / check (push) Successful in 4m31s
check / check (push) Successful in 4m31s
When the batch's target map lacks a delivery's target, as it does for every delivery when the batch query fails, sendRecoveredDeliveries looks the target up on its own. The new test hands it an empty map and checks the healthy delivery is queued once, with its real target id and type. Model: opus-5-5
This commit is contained in:
@@ -352,6 +352,21 @@ func (e *Engine) ExportFailMissingTarget(
|
||||
e.failMissingTarget(webhookDB, webhookID, d)
|
||||
}
|
||||
|
||||
// ExportSendRecoveredDeliveries exposes sendRecoveredDeliveries, so a
|
||||
// test can hand it a target map that lacks a delivery's target.
|
||||
func (e *Engine) ExportSendRecoveredDeliveries(
|
||||
ctx context.Context,
|
||||
webhookDB *gorm.DB,
|
||||
deliveries []database.Delivery,
|
||||
webhookID string,
|
||||
targetMap map[string]database.Target,
|
||||
settled map[string]struct{},
|
||||
) {
|
||||
e.sendRecoveredDeliveries(
|
||||
ctx, webhookDB, deliveries, webhookID, targetMap, settled,
|
||||
)
|
||||
}
|
||||
|
||||
// ExportDeliveryCh returns the delivery channel.
|
||||
func (e *Engine) ExportDeliveryCh() chan Task {
|
||||
return e.deliveryCh
|
||||
|
||||
Reference in New Issue
Block a user