Skip to content

Commit

Permalink
embed,integration,snapshot: use "LogOutputs"
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Apr 25, 2018
1 parent b748abc commit 88c70d0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion embed/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions functional/agent/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions integration/embed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion snapshot/member_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions snapshot/v3_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 88c70d0

Please sign in to comment.