Merge pull request #82229 from pohly/log-datetime-test-fix

e2e log: fix time stamp normalization in unit test
This commit is contained in:
Kubernetes Prow Robot 2019-09-03 17:24:58 -07:00 committed by GitHub
commit 6cb788c80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ func normalizeReport(report reporters.FakeReporter) suiteResults {
}
// timePrefix matches "Jul 17 08:08:25.950: " at the beginning of each line.
var timePrefix = regexp.MustCompile(`(?m)^[[:alpha:]]{3} [[:digit:]]{1,2} [[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}.[[:digit:]]{3}: `)
var timePrefix = regexp.MustCompile(`(?m)^[[:alpha:]]{3} +[[:digit:]]{1,2} +[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}.[[:digit:]]{3}: `)
func stripTimes(in string) string {
return timePrefix.ReplaceAllString(in, "")