Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions klog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func TestHeaderWithDir(t *testing.T) {
timeNow = func() time.Time {
return time.Date(2006, 1, 2, 15, 4, 5, .067890e9, time.Local)
}
pid = 1234
buffer.Pid = 1234
Info("test")
re := regexp.MustCompile(`I0102 15:04:05.067890 1234 (klog|v2)/klog_test.go:(\d+)] test\n`)
if !re.MatchString(contents(severity.InfoLog)) {
Expand Down Expand Up @@ -1119,7 +1119,7 @@ func TestInfoS(t *testing.T) {
timeNow = func() time.Time {
return time.Date(2006, 1, 2, 15, 4, 5, .067890e9, time.Local)
}
pid = 1234
buffer.Pid = 1234
var testDataInfo = []struct {
msg string
format string
Expand Down Expand Up @@ -1176,7 +1176,7 @@ func TestVInfoS(t *testing.T) {
timeNow = func() time.Time {
return time.Date(2006, 1, 2, 15, 4, 5, .067890e9, time.Local)
}
pid = 1234
buffer.Pid = 1234
myData := struct {
Data string
}{
Expand Down Expand Up @@ -1258,7 +1258,7 @@ func TestErrorS(t *testing.T) {
return time.Date(2006, 1, 2, 15, 4, 5, .067890e9, time.Local)
}
logging.logFile = ""
pid = 1234
buffer.Pid = 1234

functions := []func(err error, msg string, keyAndValues ...interface{}){
ErrorS,
Expand Down