diff --git a/embed/config_test.go b/embed/config_test.go index f9ba75cef22d..e199779af012 100644 --- a/embed/config_test.go +++ b/embed/config_test.go @@ -33,10 +33,16 @@ func TestConfigFileOtherFields(t *testing.T) { ClientSecurityCfgFile securityConfig `json:"client-transport-security"` PeerSecurityCfgFile securityConfig `json:"peer-transport-security"` ForceNewCluster bool `json:"force-new-cluster"` + Logger string `json:"logger"` + LogOutput string `json:"log-output"` + Debug bool `json:"debug"` }{ ctls, ptls, true, + "zap", + "io-discard", + false, } b, err := yaml.Marshal(&yc) @@ -150,6 +156,9 @@ func mustCreateCfgFile(t *testing.T, b []byte) *os.File { func TestAutoCompactionModeInvalid(t *testing.T) { cfg := NewConfig() + cfg.Logger = "zap" + cfg.LogOutput = "io-discard" + cfg.Debug = false cfg.AutoCompactionMode = "period" err := cfg.Validate() if err == nil { diff --git a/integration/cluster_test.go b/integration/cluster_test.go index e7475abaa473..a706f0dd407e 100644 --- a/integration/cluster_test.go +++ b/integration/cluster_test.go @@ -28,8 +28,6 @@ import ( "github.com/coreos/etcd/client" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/pkg/testutil" - - "github.com/coreos/pkg/capnslog" ) func init() { @@ -456,9 +454,6 @@ func TestRejectUnhealthyRemove(t *testing.T) { func TestRestartRemoved(t *testing.T) { defer testutil.AfterTest(t) - capnslog.SetGlobalLogLevel(capnslog.INFO) - defer capnslog.SetGlobalLogLevel(defaultLogLevel) - // 1. start single-member cluster c := NewCluster(t, 1) for _, m := range c.Members { diff --git a/integration/embed_test.go b/integration/embed_test.go index b5ae39e32b15..f15da7678b14 100644 --- a/integration/embed_test.go +++ b/integration/embed_test.go @@ -52,6 +52,10 @@ func TestEmbedEtcd(t *testing.T) { // setup defaults for i := range tests { tests[i].cfg = *embed.NewConfig() + tests[i].cfg.Logger = "zap" + tests[i].cfg.LogOutput = "io-discard" + tests[i].cfg.Debug = false + } tests[0].cfg.Durl = "abc" @@ -175,6 +179,10 @@ func newEmbedURLs(secure bool, n int) (urls []url.URL) { } func setupEmbedCfg(cfg *embed.Config, curls []url.URL, purls []url.URL) { + cfg.Logger = "zap" + cfg.LogOutput = "io-discard" + cfg.Debug = false + cfg.ClusterState = "new" cfg.LCUrls, cfg.ACUrls = curls, curls cfg.LPUrls, cfg.APUrls = purls, purls diff --git a/integration/member_test.go b/integration/member_test.go index 539adfec9b08..a56dd4be8d13 100644 --- a/integration/member_test.go +++ b/integration/member_test.go @@ -28,6 +28,7 @@ import ( func TestPauseMember(t *testing.T) { defer testutil.AfterTest(t) + c := NewCluster(t, 5) c.Launch(t) defer c.Terminate(t)