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:
@@ -229,6 +229,8 @@ func TestInboundLogPages(t *testing.T) {
|
||||
// A page past the end, or nonsense, is the last page, or the first.
|
||||
has(t, "page 9", s.get(s.h.HandleInboundLog, "/inbound/log?domain=a.example.com&p=9", globalPrincipal).Body.String(), `Page 2 of 2`, `Hello A`)
|
||||
has(t, "page x", s.get(s.h.HandleInboundLog, "/inbound/log?domain=a.example.com&p=x", globalPrincipal).Body.String(), `Page 1 of 2`)
|
||||
has(t, "page huge", s.get(s.h.HandleInboundLog, "/inbound/log?domain=a.example.com&p=99999999999999999999", globalPrincipal).Body.String(), `Page 2 of 2`, `Hello A`)
|
||||
has(t, "page 0", s.get(s.h.HandleInboundLog, "/inbound/log?domain=a.example.com&p=0", globalPrincipal).Body.String(), `Page 1 of 2`)
|
||||
}
|
||||
|
||||
func TestInboundLogEmptyAndOff(t *testing.T) {
|
||||
@@ -237,6 +239,9 @@ func TestInboundLogEmptyAndOff(t *testing.T) {
|
||||
body := s.get(h.HandleInboundLog, "/inbound/log", globalPrincipal).Body.String()
|
||||
has(t, "empty log", body, `No messages logged yet.`)
|
||||
lacks(t, "empty log", body, `<table`, `Page 1`)
|
||||
body = s.get(h.HandleInboundLog, "/inbound/log?p=5", globalPrincipal).Body.String()
|
||||
has(t, "empty log, page 5", body, `No messages logged yet.`)
|
||||
lacks(t, "empty log, page 5", body, `<table`, `Page `)
|
||||
|
||||
h.cfg.InboundEnabled = false
|
||||
if rec := s.get(h.HandleInboundLog, "/inbound/log", globalPrincipal); rec.Code != http.StatusNotFound {
|
||||
|
||||
Reference in New Issue
Block a user