From 07d713383720ebdb55b9831d49580942f9cb4440 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 2 Sep 2019 09:32:22 +0200 Subject: [PATCH] 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. --- test/e2e/framework/log/logger_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/log/logger_test.go b/test/e2e/framework/log/logger_test.go index 2193e92ab3a..0cf98107b85 100644 --- a/test/e2e/framework/log/logger_test.go +++ b/test/e2e/framework/log/logger_test.go @@ -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, "")