Files
felhom-controller/controller/internal/api/report_trigger_nilsafe_test.go
T
admin fe9266f53f feat(report): v0.139.0 — immediate out-of-cycle hub report on user actions (Direction 1)
New report.Trigger (buffered-1 chan + worker; quiet 2s, min spacing 15s,
trailing-edge coalescing) generalizes the v0.70.0 geo out-of-band push.
One canonical fire closure in main.go; wired: geo save/sync + app
deploy/remove/delete (api reportPushNow), escrow recovery-code claim,
notification-prefs save, app-email toggle, offsite config + per-app
toggle, customer claim (web SetReportTrigger seam, nil-safe, fired only
after a successful local commit). 15-min hub-report cycle untouched as
the reconciliation backbone; hub.enabled=false stays a strict no-op.
Tests: trigger engine (2 red-proofs), seam fires-after-commit-only,
nil-seam no-ops.
2026-07-16 19:31:19 +02:00

12 lines
406 B
Go

package api
import "testing"
// Group D (Scenario D, v0.139.0): with the seam unset (hub reporting disabled → main.go
// never calls SetReportPushTrigger), reportPushNow is a strict nil-safe no-op — the
// deploy/remove/geo handlers calling it must never panic.
func TestReportPushNow_NilSeamIsNoOp(t *testing.T) {
r := &Router{}
r.reportPushNow() // must not panic with triggerReportPush == nil
}