Skip to content

Commit 07d7133

Browse files
committed
e2e log: fix time stamp normalization in unit test
The date/time regex did not cover that "Sep 1 09:32:17.938" uses " 1" instead of "1" for the day and thus the test started failing in September.
1 parent b327a72 commit 07d7133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/framework/log/logger_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func normalizeReport(report reporters.FakeReporter) suiteResults {
138138
}
139139

140140
// timePrefix matches "Jul 17 08:08:25.950: " at the beginning of each line.
141-
var timePrefix = regexp.MustCompile(`(?m)^[[:alpha:]]{3} [[:digit:]]{1,2} [[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}.[[:digit:]]{3}: `)
141+
var timePrefix = regexp.MustCompile(`(?m)^[[:alpha:]]{3} +[[:digit:]]{1,2} +[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}.[[:digit:]]{3}: `)
142142

143143
func stripTimes(in string) string {
144144
return timePrefix.ReplaceAllString(in, "")

0 commit comments

Comments
 (0)