aboutsummaryrefslogtreecommitdiffstats
path: root/dns/proxy_test.go
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2019-08-10 12:19:03 +0200
committerMartin Polden <mpolden@mpolden.no>2019-08-10 12:19:03 +0200
commitf420921c07c3898acbd09978e2bbe00bae7114ae (patch)
tree32565913b15db2a38f514844f6f398744af57093 /dns/proxy_test.go
parent8bbf760c89a048bab37ed9d3dc66c170263e5f49 (diff)
Periodically prune log entries
Diffstat (limited to 'dns/proxy_test.go')
-rw-r--r--dns/proxy_test.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/dns/proxy_test.go b/dns/proxy_test.go
index 62fc7f0..1a458c0 100644
--- a/dns/proxy_test.go
+++ b/dns/proxy_test.go
@@ -48,20 +48,16 @@ func (c testClient) Exchange(m *dns.Msg, addr string) (*dns.Msg, time.Duration,
type testLogger struct{ question string }
-func (l *testLogger) Close() error { return nil }
-
-func (l *testLogger) Printf(format string, v ...interface{}) {}
-
-func (l *testLogger) LogRequest(qtype uint16, question, answer string) {
- l.question = question
-}
+func (l *testLogger) Close() error { return nil }
+func (l *testLogger) Printf(format string, v ...interface{}) {}
+func (l *testLogger) Record(qtype uint16, question, answer string) { l.question = question }
func testProxy(t *testing.T) *Proxy {
return testProxyWithOptions(t, ProxyOptions{CacheExpiryInterval: time.Minute})
}
func testProxyWithOptions(t *testing.T, options ProxyOptions) *Proxy {
- log, err := log.New(ioutil.Discard, "", "")
+ log, err := log.New(ioutil.Discard, "", log.RecordOptions{})
if err != nil {
t.Fatal(err)
}