mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
embed,integration,snapshot: use "LogOutputs"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
b748abca67
commit
88c70d0ca9
@ -157,7 +157,7 @@ func mustCreateCfgFile(t *testing.T, b []byte) *os.File {
|
||||
func TestAutoCompactionModeInvalid(t *testing.T) {
|
||||
cfg := NewConfig()
|
||||
cfg.Logger = "zap"
|
||||
cfg.LogOutput = []string{"/dev/null"}
|
||||
cfg.LogOutputs = []string{"/dev/null"}
|
||||
cfg.Debug = false
|
||||
cfg.AutoCompactionMode = "period"
|
||||
err := cfg.Validate()
|
||||
|
@ -88,11 +88,11 @@ func (srv *Server) handleTesterRequest(req *rpcpb.Request) (resp *rpcpb.Response
|
||||
// just archive the first file
|
||||
func (srv *Server) createEtcdLogFile() error {
|
||||
var err error
|
||||
srv.etcdLogFile, err = os.Create(srv.Member.Etcd.LogOutput[0])
|
||||
srv.etcdLogFile, err = os.Create(srv.Member.Etcd.LogOutputs[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
srv.lg.Info("created etcd log file", zap.String("path", srv.Member.Etcd.LogOutput[0]))
|
||||
srv.lg.Info("created etcd log file", zap.String("path", srv.Member.Etcd.LogOutputs[0]))
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ func (srv *Server) handle_SIGQUIT_ETCD_AND_ARCHIVE_DATA() (*rpcpb.Response, erro
|
||||
// TODO: support separate WAL directory
|
||||
if err = archive(
|
||||
srv.Member.BaseDir,
|
||||
srv.Member.Etcd.LogOutput[0],
|
||||
srv.Member.Etcd.LogOutputs[0],
|
||||
srv.Member.Etcd.DataDir,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
|
@ -53,7 +53,7 @@ func TestEmbedEtcd(t *testing.T) {
|
||||
for i := range tests {
|
||||
tests[i].cfg = *embed.NewConfig()
|
||||
tests[i].cfg.Logger = "zap"
|
||||
tests[i].cfg.LogOutput = []string{"/dev/null"}
|
||||
tests[i].cfg.LogOutputs = []string{"/dev/null"}
|
||||
tests[i].cfg.Debug = false
|
||||
|
||||
}
|
||||
@ -180,7 +180,7 @@ 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 = []string{"/dev/null"}
|
||||
cfg.LogOutputs = []string{"/dev/null"}
|
||||
cfg.Debug = false
|
||||
|
||||
cfg.ClusterState = "new"
|
||||
|
@ -64,7 +64,7 @@ func TestSnapshotV3RestoreMultiMemberAdd(t *testing.T) {
|
||||
|
||||
cfg := embed.NewConfig()
|
||||
cfg.Logger = "zap"
|
||||
cfg.LogOutput = []string{"/dev/null"}
|
||||
cfg.LogOutputs = []string{"/dev/null"}
|
||||
cfg.Debug = false
|
||||
cfg.Name = "3"
|
||||
cfg.InitialClusterToken = testClusterTkn
|
||||
|
@ -44,7 +44,7 @@ func TestSnapshotV3RestoreSingle(t *testing.T) {
|
||||
|
||||
cfg := embed.NewConfig()
|
||||
cfg.Logger = "zap"
|
||||
cfg.LogOutput = []string{"/dev/null"}
|
||||
cfg.LogOutputs = []string{"/dev/null"}
|
||||
cfg.Debug = false
|
||||
cfg.Name = "s1"
|
||||
cfg.InitialClusterToken = testClusterTkn
|
||||
@ -153,7 +153,7 @@ func createSnapshotFile(t *testing.T, kvs []kv) string {
|
||||
|
||||
cfg := embed.NewConfig()
|
||||
cfg.Logger = "zap"
|
||||
cfg.LogOutput = []string{"/dev/null"}
|
||||
cfg.LogOutputs = []string{"/dev/null"}
|
||||
cfg.Debug = false
|
||||
cfg.Name = "default"
|
||||
cfg.ClusterState = "new"
|
||||
@ -220,7 +220,7 @@ func restoreCluster(t *testing.T, clusterN int, dbPath string) (
|
||||
for i := 0; i < clusterN; i++ {
|
||||
cfg := embed.NewConfig()
|
||||
cfg.Logger = "zap"
|
||||
cfg.LogOutput = []string{"/dev/null"}
|
||||
cfg.LogOutputs = []string{"/dev/null"}
|
||||
cfg.Debug = false
|
||||
cfg.Name = fmt.Sprintf("%d", i)
|
||||
cfg.InitialClusterToken = testClusterTkn
|
||||
|
Loading…
x
Reference in New Issue
Block a user