Show a slack target's retry setting in the target list (closes #395)
check / check (push) Failing after 1m6s

The target list showed only the masked webhook URL for a slack
target, though its edit page saves a retry setting and delivery
honours it. It now shows the same retry fields, with the same
labels and wording, as an http target.

Model: opus-5-5
This commit is contained in:
2026-10-02 20:47:06 +00:00
parent da75950e91
commit 44cfe72bbc
2 changed files with 39 additions and 8 deletions
+30 -2
View File
@@ -158,7 +158,10 @@ func TestNewTargetViews_DeletedTarget(t *testing.T) {
)
assert.Equal(
t,
map[string]string{"Webhook URL": slackMaskedURL},
map[string]string{
"Webhook URL": slackMaskedURL,
"Max Retries": "0 (fire-and-forget)",
},
fieldMap(view.Config),
)
}
@@ -189,7 +192,32 @@ func TestNewTargetViews_Slack(t *testing.T) {
assert.Equal(
t,
map[string]string{"Webhook URL": slackMaskedURL},
map[string]string{
"Webhook URL": slackMaskedURL,
"Max Retries": "0 (fire-and-forget)",
},
fieldMap(view.Config),
)
}
// TestNewTargetViews_SlackRetries proves a Slack target shows
// its retry settings the same way an HTTP target does.
func TestNewTargetViews_SlackRetries(t *testing.T) {
t.Parallel()
target := slackTarget()
target.MaxRetries = 2
target.MaxQueueSize = 100
view := viewFor(t, target)
assert.Equal(
t,
map[string]string{
"Webhook URL": slackMaskedURL,
"Max Retries": "2",
"Max Queue Size": "100",
},
fieldMap(view.Config),
)
}