aboutsummaryrefslogtreecommitdiff
path: root/test/proxy_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-07-19 16:23:06 +0100
committerGravatar GitHub <noreply@github.com> 2018-07-19 16:23:06 +0100
commitf3134da45eb2808431a29fa55c58e3271bbba637 (patch)
treef4cf5a6e2453959cbb69b4e46e82efb62b370a1c /test/proxy_test.go
parentc69bed726b4a7b8726833e009ed6dd70a74f0dec (diff)
downloadcoredns-f3134da45eb2808431a29fa55c58e3271bbba637.tar.gz
coredns-f3134da45eb2808431a29fa55c58e3271bbba637.tar.zst
coredns-f3134da45eb2808431a29fa55c58e3271bbba637.zip
Clean up tests logging (#1979)
* Clean up tests logging This cleans up the travis logs so you can see the failures better. Older tests in tests/ would call log.SetOutput(ioutil.Discard) in a haphazard way. This add log.Discard and put an `init` function in each package's dir (no way to do this globally). The cleanup in tests/ is clear. All plugins also got this init function to have some uniformity and kill any (future) logging there in the tests as well. There is a one-off in pkg/healthcheck because that does log. Signed-off-by: Miek Gieben <miek@miek.nl> * bring back original log_test.go Signed-off-by: Miek Gieben <miek@miek.nl> * suppress logging here as well Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'test/proxy_test.go')
-rw-r--r--test/proxy_test.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/test/proxy_test.go b/test/proxy_test.go
index d25ace689..87a05a21e 100644
--- a/test/proxy_test.go
+++ b/test/proxy_test.go
@@ -1,8 +1,6 @@
package test
import (
- "io/ioutil"
- "log"
"testing"
"github.com/coredns/coredns/plugin/proxy"
@@ -31,8 +29,6 @@ func TestLookupProxy(t *testing.T) {
}
defer i.Stop()
- log.SetOutput(ioutil.Discard)
-
p := proxy.NewLookup([]string{udp})
state := request.Request{W: &test.ResponseWriter{}, Req: new(dns.Msg)}
resp, err := p.Lookup(state, "example.org.", dns.TypeA)
@@ -70,8 +66,6 @@ func TestLookupDnsWithForcedTcp(t *testing.T) {
}
defer i.Stop()
- log.SetOutput(ioutil.Discard)
-
p := proxy.NewLookupWithOption([]string{tcp}, proxy.Options{ForceTCP: true})
state := request.Request{W: &test.ResponseWriter{}, Req: new(dns.Msg)}
resp, err := p.Lookup(state, "example.org.", dns.TypeA)
@@ -114,8 +108,6 @@ func BenchmarkProxyLookup(b *testing.B) {
}
defer i.Stop()
- log.SetOutput(ioutil.Discard)
-
p := proxy.NewLookup([]string{udp})
state := request.Request{W: &test.ResponseWriter{}, Req: new(dns.Msg)}