Browse Source

Merge pull request #8843 from gyuho/log

store: silence server logs in v2v3 store tests
Gyu-Ho Lee 8 years ago
parent
commit
672d4ae93f
1 changed files with 9 additions and 0 deletions
  1. 9 0
      store/store_v2v3_test.go

+ 9 - 0
store/store_v2v3_test.go

@@ -17,13 +17,22 @@
 package store_test
 package store_test
 
 
 import (
 import (
+	"io/ioutil"
 	"testing"
 	"testing"
 
 
 	"github.com/coreos/etcd/etcdserver/api/v2v3"
 	"github.com/coreos/etcd/etcdserver/api/v2v3"
 	"github.com/coreos/etcd/integration"
 	"github.com/coreos/etcd/integration"
 	"github.com/coreos/etcd/store"
 	"github.com/coreos/etcd/store"
+
+	"github.com/coreos/pkg/capnslog"
+	"google.golang.org/grpc/grpclog"
 )
 )
 
 
+func init() {
+	capnslog.SetGlobalLogLevel(capnslog.CRITICAL)
+	grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
+}
+
 type v2v3TestStore struct {
 type v2v3TestStore struct {
 	store.Store
 	store.Store
 	clus *integration.ClusterV3
 	clus *integration.ClusterV3