From f3134da45eb2808431a29fa55c58e3271bbba637 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Thu, 19 Jul 2018 16:23:06 +0100 Subject: 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 * bring back original log_test.go Signed-off-by: Miek Gieben * suppress logging here as well Signed-off-by: Miek Gieben --- plugin/errors/log_test.go | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 plugin/errors/log_test.go (limited to 'plugin/errors') diff --git a/plugin/errors/log_test.go b/plugin/errors/log_test.go new file mode 100644 index 000000000..643c16a2d --- /dev/null +++ b/plugin/errors/log_test.go @@ -0,0 +1,5 @@ +package errors + +import clog "github.com/coredns/coredns/plugin/pkg/log" + +func init() { clog.Discard() } -- cgit v1.2.3