Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierluigi Lenoci committed Mar 9, 2021
1 parent 0911c80 commit fc6e969
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions integration_tests/klog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,23 @@ func TestDestinationsWithDifferentFlags(t *testing.T) {
// Everything above -stderrthreshold, including the trace on fatal, will
// be logged to stderr, even if we set -logtostderr to false.

flags: []string{"-logtostderr=false", "-alsologtostderr=false", "-stderrthreshold=1"},
flags: []string{"-logtostderr=false", "-alsologtostderr=false", "-stderrthreshold=1", "-alsologtostderrthreshold=1"},

expectedOnStderr: res{warningLogRE, errorLogRE, stackTraceRE},
notExpectedOnStderr: res{infoLogRE},
},
"with logtostderr only": {
// Everything, including the trace on fatal, goes to stderr

flags: []string{"-logtostderr=true", "-alsologtostderr=false", "-stderrthreshold=1000"},
flags: []string{"-logtostderr=true", "-alsologtostderr=false", "-stderrthreshold=0", "-alsologtostderrthreshold=1000"},

expectedOnStderr: allLogREs,
},
"with log file only": {
// Everything, including the trace on fatal, goes to the single log file

logfile: true,
flags: []string{"-logtostderr=false", "-alsologtostderr=false", "-stderrthreshold=1000"},
flags: []string{"-logtostderr=false", "-alsologtostderr=false", "-stderrthreshold=1000", "-alsologtostderrthreshold=1000"},

expectedLogFile: true,

Expand All @@ -133,7 +133,7 @@ func TestDestinationsWithDifferentFlags(t *testing.T) {
// Everything, including the trace on fatal, goes to the log files in the log dir

logdir: true,
flags: []string{"-logtostderr=false", "-alsologtostderr=false", "-stderrthreshold=1000"},
flags: []string{"-logtostderr=false", "-alsologtostderr=false", "-stderrthreshold=1000", "-alsologtostderrthreshold=1000"},

expectedLogDir: true,

Expand All @@ -145,7 +145,7 @@ func TestDestinationsWithDifferentFlags(t *testing.T) {
// Everything, including the trace on fatal, goes to the log files in the log dir

logdir: true,
flags: []string{"-logtostderr=false", "-alsologtostderr=false", "-stderrthreshold=1000", "-one_output=true"},
flags: []string{"-logtostderr=false", "-alsologtostderr=false", "-stderrthreshold=1000", "-alsologtostderrthreshold=1000", "-one_output=true"},

expectedLogDir: true,

Expand All @@ -158,7 +158,7 @@ func TestDestinationsWithDifferentFlags(t *testing.T) {
// ignored, nothing goes to the log files in the log dir.

logdir: true,
flags: []string{"-logtostderr=true", "-alsologtostderr=false", "-stderrthreshold=1000"},
flags: []string{"-logtostderr=true", "-alsologtostderr=false", "-stderrthreshold=0", "-alsologtostderrthreshold=1000"},

expectedOnStderr: allLogREs,
},
Expand All @@ -179,7 +179,7 @@ func TestDestinationsWithDifferentFlags(t *testing.T) {
// Everything, including the trace on fatal, goes to the single log file
// AND to stderr.

flags: []string{"-alsologtostderr=true", "-logtostderr=false", "-stderrthreshold=1000", "-alsologtostderrthreshold=1000"},
flags: []string{"-alsologtostderr=true", "-logtostderr=false", "-stderrthreshold=1000", "-alsologtostderrthreshold=0"},
logfile: true,

expectedLogFile: true,
Expand All @@ -192,7 +192,7 @@ func TestDestinationsWithDifferentFlags(t *testing.T) {
// log dir AND to stderr.

logdir: true,
flags: []string{"-alsologtostderr=true", "-logtostderr=false", "-stderrthreshold=1000", "-alsologtostderrthreshold=1000"},
flags: []string{"-alsologtostderr=true", "-logtostderr=false", "-stderrthreshold=1000", "-alsologtostderrthreshold=0"},

expectedLogDir: true,

Expand All @@ -205,7 +205,7 @@ func TestDestinationsWithDifferentFlags(t *testing.T) {
// log dir AND to stderr.

logdir: true,
flags: []string{"-alsologtostderr=true", "-logtostderr=false", "-stderrthreshold=1000", "-alsotostderrthreshold=1000", "-one_output=true"},
flags: []string{"-alsologtostderr=true", "-logtostderr=false", "-stderrthreshold=1000", "-alsotostderrthreshold=0", "-one_output=true"},

expectedLogDir: true,

Expand Down

0 comments on commit fc6e969

Please sign in to comment.