diff options
Diffstat (limited to 'plugin/errors/errors_test.go')
-rw-r--r-- | plugin/errors/errors_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/errors/errors_test.go b/plugin/errors/errors_test.go index f3857df56..afe809c71 100644 --- a/plugin/errors/errors_test.go +++ b/plugin/errors/errors_test.go @@ -18,7 +18,8 @@ import ( func TestErrors(t *testing.T) { buf := bytes.Buffer{} - em := errorHandler{Log: log.New(&buf, "", 0)} + log.SetOutput(&buf) + em := errorHandler{} testErr := errors.New("test error") tests := []struct { @@ -36,7 +37,7 @@ func TestErrors(t *testing.T) { { next: genErrorHandler(dns.RcodeNotAuth, testErr), expectedCode: dns.RcodeNotAuth, - expectedLog: fmt.Sprintf("[ERROR %d %s] %v\n", dns.RcodeNotAuth, "example.org. A", testErr), + expectedLog: fmt.Sprintf("[ERROR] %d %s: %v\n", dns.RcodeNotAuth, "example.org. A", testErr), expectedErr: testErr, }, } |