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>
This commit is contained in:
parent
c69bed726b
commit
f3134da45e
59 changed files with 188 additions and 82 deletions
|
@ -5,8 +5,6 @@ package test
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -53,7 +51,6 @@ func TestEtcdStubAndProxyLookup(t *testing.T) {
|
|||
defer ex.Stop()
|
||||
|
||||
etc := etcdPlugin()
|
||||
log.SetOutput(ioutil.Discard)
|
||||
|
||||
var ctx = context.TODO()
|
||||
for _, serv := range servicesStub { // adds example.{net,org} as stubs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue