mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 18:53:43 -04:00
@@ -50,7 +50,7 @@ func errorLogger(code int, qName, qType, err string) {
|
||||
}
|
||||
|
||||
func consLogger(cnt uint32, pattern string, p time.Duration) {
|
||||
log.Errorf("%d errors like '%s' occured in last %s", cnt, pattern, p)
|
||||
log.Errorf("%d errors like '%s' occurred in last %s", cnt, pattern, p)
|
||||
}
|
||||
|
||||
func (h *errorHandler) logPattern(i int) {
|
||||
|
||||
@@ -78,7 +78,7 @@ func TestConsLogger(t *testing.T) {
|
||||
|
||||
consLogger(5, "^Error.*!$", 3*time.Second)
|
||||
|
||||
exp := "[ERROR] plugin/errors: 5 errors like '^Error.*!$' occured in last 3s"
|
||||
exp := "[ERROR] plugin/errors: 5 errors like '^Error.*!$' occurred in last 3s"
|
||||
act := buf.String()
|
||||
if !strings.Contains(act, exp) {
|
||||
t.Errorf("Unexpected log message, expected to contain %q, actual %q", exp, act)
|
||||
|
||||
Reference in New Issue
Block a user