Skip to content

Commit

Permalink
functional: add "LogLevel" flags
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
  • Loading branch information
gyuho committed Aug 1, 2019
1 parent 22a3ec3 commit f1c7fd3
Show file tree
Hide file tree
Showing 6 changed files with 1,688 additions and 1,131 deletions.
6 changes: 3 additions & 3 deletions functional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ agent-configs:
initial-corrupt-check: true
logger: zap
log-outputs: [/tmp/etcd-functional-1/etcd.log]
debug: true
log-level: info
client-cert-data: ""
client-cert-path: ""
client-key-data: ""
Expand Down Expand Up @@ -86,7 +86,7 @@ agent-configs:
initial-corrupt-check: true
logger: zap
log-outputs: [/tmp/etcd-functional-2/etcd.log]
debug: true
log-level: info
client-cert-data: ""
client-cert-path: ""
client-key-data: ""
Expand Down Expand Up @@ -137,7 +137,7 @@ agent-configs:
initial-corrupt-check: true
logger: zap
log-outputs: [/tmp/etcd-functional-3/etcd.log]
debug: true
log-level: info
client-cert-data: ""
client-cert-path: ""
client-key-data: ""
Expand Down
4 changes: 2 additions & 2 deletions functional/rpcpb/etcd_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var etcdFields = []string{

"Logger",
"LogOutputs",
"Debug",
"LogLevel",
}

// Flags returns etcd flags in string slice.
Expand Down Expand Up @@ -168,7 +168,7 @@ func (e *Etcd) EmbedConfig() (cfg *embed.Config, err error) {

cfg.Logger = e.Logger
cfg.LogOutputs = e.LogOutputs
cfg.Debug = e.Debug
cfg.LogLevel = e.LogLevel

return cfg, nil
}
6 changes: 3 additions & 3 deletions functional/rpcpb/etcd_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func TestEtcd(t *testing.T) {

Logger: "zap",
LogOutputs: []string{"/tmp/etcd-functional-1/etcd.log"},
Debug: true,
LogLevel: "info",
}

exps := []string{
Expand All @@ -85,7 +85,7 @@ func TestEtcd(t *testing.T) {
"--experimental-initial-corrupt-check=true",
"--logger=zap",
"--log-outputs=/tmp/etcd-functional-1/etcd.log",
"--debug=true",
"--log-level=info",
}
fs := e.Flags()
if !reflect.DeepEqual(exps, fs) {
Expand Down Expand Up @@ -134,7 +134,7 @@ func TestEtcd(t *testing.T) {
expc.ExperimentalInitialCorruptCheck = true
expc.Logger = "zap"
expc.LogOutputs = []string{"/tmp/etcd-functional-1/etcd.log"}
expc.Debug = true
expc.LogLevel = "info"
cfg, err := e.EmbedConfig()
if err != nil {
t.Fatal(err)
Expand Down
Loading

0 comments on commit f1c7fd3

Please sign in to comment.