mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
integration,embed: ignore embed log output
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
cc778746fc
commit
35a80bc910
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user