A target's settings move from the per-type JSON string in targets.config to columns: url, headers, timeout_seconds, forward_query, archive_expiry and archive_rotation. A column a type does not use stays empty. headers holds the header map as JSON text through GORM's JSON serializer, and archive_expiry holds a time.Duration, 0 meaning never. The forms check each setting once, with the same refusals and messages, and the edit form is filled from the columns, so the per-type config structs, their parsers and the "could not be read" branches are gone. A delivery task carries the six settings in place of the JSON string; tests check that each copy into a task, and back out of one, keeps all six. Model: opus-5-5
This commit was merged in pull request #554.
This commit is contained in:
@@ -65,20 +65,6 @@ func testEngine(
|
||||
)
|
||||
}
|
||||
|
||||
func newHTTPTargetConfig(url string) string {
|
||||
cfg := delivery.HTTPTargetConfig{URL: url}
|
||||
|
||||
data, err := json.Marshal(cfg)
|
||||
if err != nil {
|
||||
panic(
|
||||
"failed to marshal HTTPTargetConfig: " +
|
||||
err.Error(),
|
||||
)
|
||||
}
|
||||
|
||||
return string(data)
|
||||
}
|
||||
|
||||
func seedEvent(
|
||||
t *testing.T, db *gorm.DB, body string,
|
||||
) database.Event {
|
||||
@@ -141,19 +127,19 @@ type httpDeliveryFixture struct {
|
||||
func buildHTTPFixture(
|
||||
dlv database.Delivery,
|
||||
event database.Event,
|
||||
targetID, name, config string,
|
||||
targetID, name, targetURL string,
|
||||
maxAttempts, attemptNum int,
|
||||
) httpDeliveryFixture {
|
||||
task := &delivery.Task{
|
||||
DeliveryID: dlv.ID,
|
||||
EventID: event.ID,
|
||||
WebhookID: event.WebhookID,
|
||||
TargetID: targetID,
|
||||
TargetName: name,
|
||||
TargetType: database.TargetTypeHTTP,
|
||||
TargetConfig: config,
|
||||
MaxAttempts: maxAttempts,
|
||||
AttemptNum: attemptNum,
|
||||
DeliveryID: dlv.ID,
|
||||
EventID: event.ID,
|
||||
WebhookID: event.WebhookID,
|
||||
TargetID: targetID,
|
||||
TargetName: name,
|
||||
TargetType: database.TargetTypeHTTP,
|
||||
TargetURL: targetURL,
|
||||
MaxAttempts: maxAttempts,
|
||||
AttemptNum: attemptNum,
|
||||
}
|
||||
|
||||
d := &database.Delivery{
|
||||
@@ -164,7 +150,7 @@ func buildHTTPFixture(
|
||||
Target: database.Target{
|
||||
Name: name,
|
||||
Type: database.TargetTypeHTTP,
|
||||
Config: config,
|
||||
URL: targetURL,
|
||||
MaxAttempts: maxAttempts,
|
||||
},
|
||||
}
|
||||
@@ -275,9 +261,8 @@ func TestDeliverHTTP_Success(t *testing.T) {
|
||||
database.DeliveryStatusPending,
|
||||
)
|
||||
|
||||
cfg := newHTTPTargetConfig(ts.URL)
|
||||
fix := buildHTTPFixture(
|
||||
dlv, event, targetID, "test-http", cfg, 1, 1,
|
||||
dlv, event, targetID, "test-http", ts.URL, 1, 1,
|
||||
)
|
||||
|
||||
e.ExportDeliverHTTP(
|
||||
@@ -321,10 +306,9 @@ func TestDeliverHTTP_Failure(t *testing.T) {
|
||||
database.DeliveryStatusPending,
|
||||
)
|
||||
|
||||
cfg := newHTTPTargetConfig(ts.URL)
|
||||
fix := buildHTTPFixture(
|
||||
dlv, event, targetID,
|
||||
"test-http-fail", cfg, 1, 1,
|
||||
"test-http-fail", ts.URL, 1, 1,
|
||||
)
|
||||
|
||||
e.ExportDeliverHTTP(
|
||||
@@ -351,7 +335,7 @@ func TestDeliverDatabase_ImmediateSuccess(
|
||||
// The database target archives for real, so the engine needs
|
||||
// the target in the main database and a data directory.
|
||||
env := setupArchiveTest(t)
|
||||
tgt := env.seedDatabaseTarget(t, "")
|
||||
tgt := env.seedDatabaseTarget(t)
|
||||
|
||||
event := seedEvent(t, db, `{"db":"target"}`)
|
||||
d := seedDatabaseTargetDelivery(t, db, event, tgt)
|
||||
@@ -452,10 +436,9 @@ func TestDeliverHTTP_WithRetries_Success(t *testing.T) {
|
||||
database.DeliveryStatusPending,
|
||||
)
|
||||
|
||||
cfg := newHTTPTargetConfig(ts.URL)
|
||||
fix := buildHTTPFixture(
|
||||
dlv, event, targetID,
|
||||
"test-http-retry", cfg, 5, 1,
|
||||
"test-http-retry", ts.URL, 5, 1,
|
||||
)
|
||||
|
||||
e.ExportDeliverHTTP(
|
||||
@@ -510,13 +493,12 @@ func TestDeliverHTTP_MaxAttemptsExhausted(t *testing.T) {
|
||||
database.DeliveryStatusPending,
|
||||
)
|
||||
|
||||
cfg := newHTTPTargetConfig(ts.URL)
|
||||
sched := &recordingScheduler{}
|
||||
|
||||
for attempt := 1; attempt <= maxAttempts; attempt++ {
|
||||
fix := buildHTTPFixture(
|
||||
dlv, event, targetID,
|
||||
"test-http-exhaust", cfg, maxAttempts, attempt,
|
||||
"test-http-exhaust", ts.URL, maxAttempts, attempt,
|
||||
)
|
||||
|
||||
e.ExportDeliverHTTPWithScheduler(
|
||||
@@ -574,10 +556,9 @@ func TestDeliverHTTP_SingleAttemptSkipsCircuitBreaker(t *testing.T) {
|
||||
database.DeliveryStatusPending,
|
||||
)
|
||||
|
||||
cfg := newHTTPTargetConfig(ts.URL)
|
||||
fix := buildHTTPFixture(
|
||||
dlv, event, targetID,
|
||||
"test-http-single", cfg, 1, 1,
|
||||
"test-http-single", ts.URL, 1, 1,
|
||||
)
|
||||
sched := &recordingScheduler{}
|
||||
|
||||
@@ -624,10 +605,9 @@ func TestDeliverHTTP_SchedulesRetryOnFailure(
|
||||
database.DeliveryStatusPending,
|
||||
)
|
||||
|
||||
cfg := newHTTPTargetConfig(ts.URL)
|
||||
fix := buildHTTPFixture(
|
||||
dlv, event, targetID,
|
||||
"test-http-schedule", cfg, 5, 1,
|
||||
"test-http-schedule", ts.URL, 5, 1,
|
||||
)
|
||||
|
||||
e.ExportDeliverHTTP(
|
||||
@@ -789,7 +769,7 @@ func seedConcurrencyTasks(
|
||||
t *testing.T,
|
||||
db *gorm.DB,
|
||||
n int,
|
||||
targetCfg string,
|
||||
targetURL string,
|
||||
) ([]database.Delivery, []delivery.Task) {
|
||||
t.Helper()
|
||||
|
||||
@@ -815,21 +795,21 @@ func seedConcurrencyTasks(
|
||||
Target: database.Target{
|
||||
Name: fmt.Sprintf("task-%d", i),
|
||||
Type: database.TargetTypeHTTP,
|
||||
Config: targetCfg,
|
||||
URL: targetURL,
|
||||
MaxAttempts: 1,
|
||||
},
|
||||
}
|
||||
tasks[i].ID = dlv.ID
|
||||
|
||||
dtasks[i] = delivery.Task{
|
||||
DeliveryID: tasks[i].ID,
|
||||
EventID: tasks[i].EventID,
|
||||
TargetID: tasks[i].TargetID,
|
||||
TargetName: tasks[i].Target.Name,
|
||||
TargetType: tasks[i].Target.Type,
|
||||
TargetConfig: tasks[i].Target.Config,
|
||||
MaxAttempts: 1,
|
||||
AttemptNum: 1,
|
||||
DeliveryID: tasks[i].ID,
|
||||
EventID: tasks[i].EventID,
|
||||
TargetID: tasks[i].TargetID,
|
||||
TargetName: tasks[i].Target.Name,
|
||||
TargetType: tasks[i].Target.Type,
|
||||
TargetURL: tasks[i].Target.URL,
|
||||
MaxAttempts: 1,
|
||||
AttemptNum: 1,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -865,9 +845,8 @@ func TestWorkerPool_BoundedConcurrency(t *testing.T) {
|
||||
defer ts.Close()
|
||||
|
||||
e := testEngine(t, numWorkers)
|
||||
cfg := newHTTPTargetConfig(ts.URL)
|
||||
tasks, dtasks := seedConcurrencyTasks(
|
||||
t, db, numTasks, cfg,
|
||||
t, db, numTasks, ts.URL,
|
||||
)
|
||||
|
||||
runConcurrencyWorkers(
|
||||
@@ -948,12 +927,9 @@ func TestDeliverHTTP_CircuitBreakerBlocks(t *testing.T) {
|
||||
database.DeliveryStatusPending,
|
||||
)
|
||||
|
||||
cfg := newHTTPTargetConfig(
|
||||
"http://will-not-be-called.invalid",
|
||||
)
|
||||
fix := buildHTTPFixture(
|
||||
dlv, event, targetID,
|
||||
"test-cb-block", cfg, 5, 1,
|
||||
"test-cb-block", "http://will-not-be-called.invalid", 5, 1,
|
||||
)
|
||||
|
||||
e.ExportDeliverHTTP(
|
||||
@@ -1016,9 +992,8 @@ func TestDeliverHTTP_HalfOpenBreakerDelaysQueuedTasks(t *testing.T) {
|
||||
require.True(t, cb.Allow(), "the probe delivery should go through")
|
||||
require.Equal(t, delivery.CircuitHalfOpen, cb.State())
|
||||
|
||||
cfg := newHTTPTargetConfig(
|
||||
"http://will-not-be-called.invalid",
|
||||
)
|
||||
const targetURL = "http://will-not-be-called.invalid"
|
||||
|
||||
sched := &recordingScheduler{}
|
||||
|
||||
const queued, passes = 3, 4
|
||||
@@ -1040,7 +1015,7 @@ func TestDeliverHTTP_HalfOpenBreakerDelaysQueuedTasks(t *testing.T) {
|
||||
|
||||
fix := buildHTTPFixture(
|
||||
row, event, targetID,
|
||||
"test-cb-half-open", cfg, 5, 1,
|
||||
"test-cb-half-open", targetURL, 5, 1,
|
||||
)
|
||||
|
||||
e.ExportDeliverHTTPWithScheduler(
|
||||
@@ -1155,62 +1130,6 @@ func TestStateAndCooldown_ReadsHTTPAndSlackBreakers(t *testing.T) {
|
||||
assert.Zero(t, cooldown, "half-open")
|
||||
}
|
||||
|
||||
func TestParseHTTPConfig_Valid(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
cfg, err := e.ExportParseHTTPConfig(
|
||||
`{"url":"https://example.com/hook",` +
|
||||
`"headers":{"X-Token":"secret"}}`,
|
||||
)
|
||||
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "https://example.com/hook", cfg.URL)
|
||||
assert.Equal(t, "secret", cfg.Headers["X-Token"])
|
||||
}
|
||||
|
||||
func TestParseHTTPConfig_Empty(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
_, err := e.ExportParseHTTPConfig("")
|
||||
|
||||
assert.Error(t, err,
|
||||
"empty config should return error",
|
||||
)
|
||||
}
|
||||
|
||||
func TestParseHTTPConfig_MissingURL(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
_, err := e.ExportParseHTTPConfig(
|
||||
`{"headers":{"X-Token":"secret"}}`,
|
||||
)
|
||||
|
||||
assert.Error(t, err,
|
||||
"config without URL should return error",
|
||||
)
|
||||
}
|
||||
|
||||
func TestParseHTTPConfig_Undecodable(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
_, err := e.ExportParseHTTPConfig(
|
||||
`{"url":"https://example.com/hook","timeout":"soon"}`,
|
||||
)
|
||||
|
||||
assert.Error(t, err,
|
||||
"config that does not decode should return error, "+
|
||||
"even when the part that did names a URL",
|
||||
)
|
||||
}
|
||||
|
||||
func TestScheduleRetry_SendsToRetryChannel(
|
||||
t *testing.T,
|
||||
) {
|
||||
@@ -1358,7 +1277,7 @@ func TestDoHTTPRequest_ForwardsHeaders(t *testing.T) {
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
cfg := &delivery.HTTPTargetConfig{
|
||||
target := &database.Target{
|
||||
URL: ts.URL,
|
||||
Headers: map[string]string{
|
||||
"X-Target-Auth": "bearer xyz",
|
||||
@@ -1373,7 +1292,7 @@ func TestDoHTTPRequest_ForwardsHeaders(t *testing.T) {
|
||||
}
|
||||
|
||||
statusCode, _, _, err := e.ExportDoHTTPRequest(
|
||||
context.TODO(), cfg, event,
|
||||
context.TODO(), target, event,
|
||||
)
|
||||
|
||||
require.NoError(t, err)
|
||||
@@ -1415,7 +1334,7 @@ func TestDoHTTPRequest_CutShortResponseIsAnError(t *testing.T) {
|
||||
|
||||
_, body, _, err := e.ExportDoHTTPRequest(
|
||||
context.TODO(),
|
||||
&delivery.HTTPTargetConfig{URL: ts.URL},
|
||||
&database.Target{URL: ts.URL},
|
||||
&database.Event{},
|
||||
)
|
||||
|
||||
@@ -1467,9 +1386,9 @@ func TestApplyRequestHeaders_SendsOneContentType(t *testing.T) {
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
cfg := &delivery.HTTPTargetConfig{}
|
||||
var configured map[string]string
|
||||
if tc.configured != "" {
|
||||
cfg.Headers = map[string]string{
|
||||
configured = map[string]string{
|
||||
headerContentType: tc.configured,
|
||||
}
|
||||
}
|
||||
@@ -1488,7 +1407,7 @@ func TestApplyRequestHeaders_SendsOneContentType(t *testing.T) {
|
||||
Headers: string(inbound),
|
||||
ContentType: tc.event,
|
||||
},
|
||||
cfg,
|
||||
configured,
|
||||
"webhooker/dev",
|
||||
)
|
||||
|
||||
@@ -1519,7 +1438,7 @@ func TestApplyRequestHeaders_UndecodableInboundForwardsNothing(
|
||||
&database.Event{
|
||||
Headers: `{"X-Custom":["value1"],"X-Broken":"not a list"}`,
|
||||
},
|
||||
&delivery.HTTPTargetConfig{},
|
||||
nil,
|
||||
"webhooker/dev",
|
||||
)
|
||||
|
||||
@@ -1537,7 +1456,7 @@ func TestProcessDelivery_RoutesToCorrectHandler(
|
||||
// The database target archives for real, so the engine needs
|
||||
// the target in the main database and a data directory.
|
||||
env := setupArchiveTest(t)
|
||||
archive := env.seedDatabaseTarget(t, "")
|
||||
archive := env.seedDatabaseTarget(t)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -1622,51 +1541,6 @@ func TestMaxInlineBodySize_Constant(t *testing.T) {
|
||||
)
|
||||
}
|
||||
|
||||
func TestParseSlackConfig_Valid(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
cfg, err := e.ExportParseSlackConfig(
|
||||
`{"webhookUrl":"https://hooks.slack.com/services/T00/B00/xxx"}`,
|
||||
)
|
||||
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t,
|
||||
"https://hooks.slack.com/services/T00/B00/xxx",
|
||||
cfg.WebhookURL,
|
||||
)
|
||||
}
|
||||
|
||||
func TestParseSlackConfig_Empty(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
_, err := e.ExportParseSlackConfig("")
|
||||
|
||||
assert.Error(t, err,
|
||||
"empty config should return error",
|
||||
)
|
||||
}
|
||||
|
||||
func TestParseSlackConfig_MissingWebhookURL(
|
||||
t *testing.T,
|
||||
) {
|
||||
t.Parallel()
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
_, err := e.ExportParseSlackConfig(
|
||||
`{"other":"field"}`,
|
||||
)
|
||||
|
||||
assert.Error(t, err,
|
||||
"config without webhook_url should return error",
|
||||
)
|
||||
}
|
||||
|
||||
func TestFormatSlackMessage_JSONBody(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -1763,11 +1637,11 @@ func TestFormatSlackMessage_LargeJSONTruncated(
|
||||
}
|
||||
|
||||
// buildSlackDelivery creates a database.Delivery
|
||||
// with a Slack target config for testing.
|
||||
// to a Slack target with the given webhook URL for testing.
|
||||
func buildSlackDelivery(
|
||||
dlv database.Delivery,
|
||||
event database.Event,
|
||||
targetID, name, slackCfg string,
|
||||
targetID, name, webhookURL string,
|
||||
) *database.Delivery {
|
||||
d := &database.Delivery{
|
||||
EventID: event.ID,
|
||||
@@ -1777,7 +1651,7 @@ func buildSlackDelivery(
|
||||
Target: database.Target{
|
||||
Name: name,
|
||||
Type: database.TargetTypeSlack,
|
||||
Config: slackCfg,
|
||||
URL: webhookURL,
|
||||
MaxAttempts: 1,
|
||||
},
|
||||
}
|
||||
@@ -1815,11 +1689,10 @@ func TestDeliverSlack_Success(t *testing.T) {
|
||||
)
|
||||
defer ts.Close()
|
||||
|
||||
e, targetID, slackCfg, event, dlv :=
|
||||
setupSlackTest(t, db, ts.URL)
|
||||
e, targetID, event, dlv := setupSlackTest(t, db)
|
||||
|
||||
d := buildSlackDelivery(
|
||||
dlv, event, targetID, "test-slack", slackCfg,
|
||||
dlv, event, targetID, "test-slack", ts.URL,
|
||||
)
|
||||
|
||||
e.ExportDeliverSlack(context.TODO(), db, d)
|
||||
@@ -1838,9 +1711,8 @@ func TestDeliverSlack_Success(t *testing.T) {
|
||||
func setupSlackTest(
|
||||
t *testing.T,
|
||||
db *gorm.DB,
|
||||
serverURL string,
|
||||
) (
|
||||
*delivery.Engine, string, string,
|
||||
*delivery.Engine, string,
|
||||
database.Event, database.Delivery,
|
||||
) {
|
||||
t.Helper()
|
||||
@@ -1848,13 +1720,6 @@ func setupSlackTest(
|
||||
e := testEngine(t, 1)
|
||||
targetID := uuid.New().String()
|
||||
|
||||
cfgBytes, err := json.Marshal(
|
||||
delivery.SlackTargetConfig{
|
||||
WebhookURL: serverURL,
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
event := seedEvent(
|
||||
t, db, `{"action":"test","data":"value"}`,
|
||||
)
|
||||
@@ -1864,7 +1729,7 @@ func setupSlackTest(
|
||||
database.DeliveryStatusPending,
|
||||
)
|
||||
|
||||
return e, targetID, string(cfgBytes), event, dlv
|
||||
return e, targetID, event, dlv
|
||||
}
|
||||
|
||||
func assertSlackPayload(
|
||||
@@ -1913,13 +1778,6 @@ func TestDeliverSlack_Failure(t *testing.T) {
|
||||
e := testEngine(t, 1)
|
||||
targetID := uuid.New().String()
|
||||
|
||||
slackCfg, err := json.Marshal(
|
||||
delivery.SlackTargetConfig{
|
||||
WebhookURL: ts.URL,
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
event := seedEvent(t, db, `{"test":true}`)
|
||||
|
||||
dlv := seedDelivery(
|
||||
@@ -1929,7 +1787,7 @@ func TestDeliverSlack_Failure(t *testing.T) {
|
||||
|
||||
d := buildSlackDelivery(
|
||||
dlv, event, targetID,
|
||||
"test-slack-fail", string(slackCfg),
|
||||
"test-slack-fail", ts.URL,
|
||||
)
|
||||
|
||||
e.ExportDeliverSlack(context.TODO(), db, d)
|
||||
@@ -1943,7 +1801,10 @@ func TestDeliverSlack_Failure(t *testing.T) {
|
||||
)
|
||||
}
|
||||
|
||||
func TestDeliverSlack_InvalidConfig(t *testing.T) {
|
||||
// TestDeliverSlack_NoURL proves a Slack target without a URL, which
|
||||
// the forms never store, fails its delivery rather than reporting it
|
||||
// delivered.
|
||||
func TestDeliverSlack_NoURL(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
db := testWebhookDB(t)
|
||||
@@ -1964,7 +1825,6 @@ func TestDeliverSlack_InvalidConfig(t *testing.T) {
|
||||
Target: database.Target{
|
||||
Name: "test-slack-bad",
|
||||
Type: database.TargetTypeSlack,
|
||||
Config: `{"not_webhook_url":"missing"}`,
|
||||
MaxAttempts: 1,
|
||||
},
|
||||
}
|
||||
@@ -2002,13 +1862,6 @@ func TestProcessDelivery_RoutesToSlack(t *testing.T) {
|
||||
|
||||
e := testEngine(t, 1)
|
||||
|
||||
slackCfg, err := json.Marshal(
|
||||
delivery.SlackTargetConfig{
|
||||
WebhookURL: ts.URL,
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
event := seedEvent(t, db, `{"route":"slack"}`)
|
||||
|
||||
dlv := seedDelivery(
|
||||
@@ -2018,7 +1871,7 @@ func TestProcessDelivery_RoutesToSlack(t *testing.T) {
|
||||
|
||||
d := buildSlackDelivery(
|
||||
dlv, event, dlv.TargetID,
|
||||
"test-slack-route", string(slackCfg),
|
||||
"test-slack-route", ts.URL,
|
||||
)
|
||||
|
||||
task := &delivery.Task{
|
||||
@@ -2133,7 +1986,7 @@ func TestDeliverLog_LogsFullContent(t *testing.T) {
|
||||
func buildSlackRetryDelivery(
|
||||
dlv database.Delivery,
|
||||
event database.Event,
|
||||
targetID, cfg string,
|
||||
targetID, webhookURL string,
|
||||
) *database.Delivery {
|
||||
d := &database.Delivery{
|
||||
EventID: event.ID,
|
||||
@@ -2143,7 +1996,7 @@ func buildSlackRetryDelivery(
|
||||
Target: database.Target{
|
||||
Name: "test-slack-retry",
|
||||
Type: database.TargetTypeSlack,
|
||||
Config: cfg,
|
||||
URL: webhookURL,
|
||||
MaxAttempts: 5,
|
||||
},
|
||||
}
|
||||
@@ -2162,11 +2015,6 @@ func TestDeliverSlack_WithRetries_SchedulesRetry(
|
||||
e := testEngine(t, 1)
|
||||
targetID := uuid.New().String()
|
||||
|
||||
slackCfg, err := json.Marshal(
|
||||
delivery.SlackTargetConfig{WebhookURL: ts.URL},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
event := seedEvent(t, db, `{"slack":"retry"}`)
|
||||
|
||||
dlv := seedDelivery(
|
||||
@@ -2175,7 +2023,7 @@ func TestDeliverSlack_WithRetries_SchedulesRetry(
|
||||
)
|
||||
|
||||
d := buildSlackRetryDelivery(
|
||||
dlv, event, targetID, string(slackCfg),
|
||||
dlv, event, targetID, ts.URL,
|
||||
)
|
||||
|
||||
task := &delivery.Task{
|
||||
|
||||
Reference in New Issue
Block a user