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 --- test/readme_test.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'test/readme_test.go') diff --git a/test/readme_test.go b/test/readme_test.go index f8ae0e346..4d216b8c8 100644 --- a/test/readme_test.go +++ b/test/readme_test.go @@ -3,7 +3,6 @@ package test import ( "bufio" "io/ioutil" - "log" "os" "path/filepath" "strconv" @@ -48,8 +47,6 @@ func TestReadme(t *testing.T) { create(contents) defer remove(contents) - log.SetOutput(ioutil.Discard) - middle := filepath.Join("..", "plugin") dirs, err := ioutil.ReadDir(middle) if err != nil { -- cgit v1.2.3