audit 4: log paging at its edges, NaN refused, a red rate limit, recalculation asks, reload writes all
test / test (push) Canceled after 0s
test / test (push) Canceled after 0s
Step 4 of stage 4 (L10, L11, L13, L18, L19 and a row of
review-2026-08-followups):
- The Outbound log counts first and clamps the page to the last; a number
too large for an int (strconv's ErrRange with the largest int) is the
last page on both logs. Tested at the edges: first, last, past the last
however far, nonsense, an empty log asked for page 5.
- checkAutoMultiplier is "not within", so NaN and the infinities are out.
- rate-limited is red (components.go; the mockup first, 643892a).
- data-unsaved on both recalculate buttons: panel.js asks on submit
(ev.submitter) when a field of the page differs from what it was drawn
with; testdata/unsaved_test.js under TestPanelJS.
- HandleReload writes what a restore's first start writes - the filter
lists and the DMARC maps too - and a failed step is an error flash on
Health that names it, not plain text; the success flash says what was
written.
Tested on the test server: go vet + go test of 25 packages, make e2e (all
pass, 695 s) on this tree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,19 @@ func TestOutLogPagesKeepTheFiltersAndThePage(t *testing.T) {
|
||||
lacks(t, "page 2", second, `Older →`)
|
||||
// A row's page is opened from the page it is on and leads back to it.
|
||||
has(t, "page 2", second, `?domain=bs.example.ru&p=2">Details</a>`)
|
||||
|
||||
// The edges (audit 2026-10-12, L10): a page past the end is the last,
|
||||
// however far past; nonsense, zero or a negative number is the first.
|
||||
for _, p := range []string{"3", "9", "99999999999999999999", "9223372036854775807"} {
|
||||
body := getBody(t, h.HandleDeliveries, "/outbound/log?domain=bs.example.ru&p="+p)
|
||||
has(t, "page "+p, body, `Page 2 of 2`, `<a href="/outbound/log?domain=bs.example.ru">← Newer</a>`)
|
||||
if got := strings.Count(body, `">Details</a>`); got == 0 {
|
||||
t.Errorf("page %s shows no rows", p)
|
||||
}
|
||||
}
|
||||
for _, p := range []string{"0", "-1", "x", ""} {
|
||||
has(t, "page "+p, getBody(t, h.HandleDeliveries, "/outbound/log?domain=bs.example.ru&p="+p), `Page 1 of 2`)
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing logged yet is a sentence in the polled region, which goes on polling,
|
||||
@@ -84,6 +97,10 @@ func TestOutLogEmpty(t *testing.T) {
|
||||
body := getBodyAs(t, h.HandleDeliveries, "/outbound/log", p)
|
||||
has(t, "empty log", body, `No messages logged yet.`, `id="out-log-rows"`, `data-poll`, `New rows appear on their own`)
|
||||
lacks(t, "empty log", body, `<table`, `Page 1`)
|
||||
// A page asked of an empty log is the same empty log.
|
||||
body = getBodyAs(t, h.HandleDeliveries, "/outbound/log?p=5", p)
|
||||
has(t, "empty log, page 5", body, `No messages logged yet.`)
|
||||
lacks(t, "empty log, page 5", body, `<table`, `Page `)
|
||||
// Only the global role is pointed at the setting that decides how long rows live.
|
||||
lacks(t, "empty log", body, `href="/server/settings"`)
|
||||
has(t, "log", getBody(t, h.HandleDeliveries, "/outbound/log"), `href="/server/settings">Settings</a>`)
|
||||
|
||||
Reference in New Issue
Block a user