diff options
author | 2016-11-29 09:54:57 +0000 | |
---|---|---|
committer | 2016-11-29 09:54:57 +0000 | |
commit | 4cfd19c7c97490dac47cd748166ec3f976e315aa (patch) | |
tree | 333b9851d6c5c80a374bf1084d2e012402710a87 /middleware/httpproxy/setup_test.go | |
parent | a1b9f96d876483b4356dddd83c24896d867e843c (diff) | |
download | coredns-4cfd19c7c97490dac47cd748166ec3f976e315aa.tar.gz coredns-4cfd19c7c97490dac47cd748166ec3f976e315aa.tar.zst coredns-4cfd19c7c97490dac47cd748166ec3f976e315aa.zip |
middleware/httpproxy: add debug queries (#446)
* middleware/httproxy: implement debug queries
Not too useful at the moment, but o-o.debug queries are supported
and return the Comment from dns.google.com.
Note that this is not always set.
* improve documentation
* Testing cleanups
Diffstat (limited to 'middleware/httpproxy/setup_test.go')
-rw-r--r-- | middleware/httpproxy/setup_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/middleware/httpproxy/setup_test.go b/middleware/httpproxy/setup_test.go index 71d631220..82db40aff 100644 --- a/middleware/httpproxy/setup_test.go +++ b/middleware/httpproxy/setup_test.go @@ -2,6 +2,7 @@ package httpproxy import ( "io/ioutil" + "log" "os" "strings" "testing" @@ -9,7 +10,9 @@ import ( "github.com/mholt/caddy" ) -func TestSetupChaos(t *testing.T) { +func TestSetupHttpproxy(t *testing.T) { + log.SetOutput(ioutil.Discard) + tests := []struct { input string shouldErr bool @@ -55,7 +58,6 @@ func TestSetupChaos(t *testing.T) { } if err != nil { - t.Logf("%q", err) if !test.shouldErr { t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) } |