type fakeAuditSink … func (s *fakeAuditSink) ProcessEvents(evs ...*auditinternal.Event) bool { … } func (s *fakeAuditSink) Events() []*auditinternal.Event { … } func (s *fakeAuditSink) Pop(timeout time.Duration) (*auditinternal.Event, error) { … } func TestConstructResponseWriter(t *testing.T) { … } func TestDecorateResponseWriterWithoutChannel(t *testing.T) { … } func TestDecorateResponseWriterWithImplicitWrite(t *testing.T) { … } func TestDecorateResponseWriterChannel(t *testing.T) { … } type fakeHTTPHandler … func (*fakeHTTPHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { … } func TestAudit(t *testing.T) { … } func TestAuditNoPanicOnNilUser(t *testing.T) { … } func TestAuditLevelNone(t *testing.T) { … } func TestAuditIDHttpHeader(t *testing.T) { … } func withTestContext(req *http.Request, user user.Info, ae *auditinternal.Event) *http.Request { … }