From 33260d91a2ae514580429689da9d9b46facd9916 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 15 Jul 2017 11:23:42 +0700 Subject: [PATCH] fix timestamp test such that it works in all timezones --- internal/utils/log_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/utils/log_test.go b/internal/utils/log_test.go index 6e0c9c27..8a44c39d 100644 --- a/internal/utils/log_test.go +++ b/internal/utils/log_test.go @@ -82,13 +82,13 @@ var _ = Describe("Log", func() { }) It("adds a timestamp", func() { - format := "Jan 2, 2006 at 3:04:05pm (MST)" + format := "Jan 2, 2006" SetLogTimeFormat(format) SetLogLevel(LogLevelInfo) Infof("info") t, err := time.Parse(format, string(b.Bytes()[:b.Len()-6])) Expect(err).ToNot(HaveOccurred()) - Expect(t).To(BeTemporally("~", time.Now(), 2*time.Second)) + Expect(t).To(BeTemporally("~", time.Now(), 25*time.Hour)) }) It("says whether debug is enabled", func() {