(t *testing.T)
| 29 | } |
| 30 | |
| 31 | func TestRecentErrorRingNilSafe(t *testing.T) { |
| 32 | var r *recentErrorRing |
| 33 | r.add(RecentError{}) // must not panic |
| 34 | if got := r.snapshot(10); got != nil { |
| 35 | t.Fatalf("nil ring snapshot = %v, want nil", got) |
| 36 | } |
| 37 | var s *Server |
| 38 | s.recordRecentError(RecentError{}) // nil server must not panic |
| 39 | if got := s.RecentErrors(10); got != nil { |
| 40 | t.Fatalf("nil server RecentErrors = %v, want nil", got) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | // The load-bearing invariant: a failed CREATE SECRET must NOT leak its credential |
| 45 | // into the Errors-page ring — neither via the stored query nor the error message |
nothing calls this directly
no test coverage detected