From 4877f7e87ad60fae6c922d07c9981aa91b1d49f3 Mon Sep 17 00:00:00 2001 From: Michael Pleshakov Date: Tue, 8 Nov 2022 16:53:42 +0000 Subject: [PATCH] Correct explanatory comment about time (#296) --- internal/status/updater_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/status/updater_test.go b/internal/status/updater_test.go index e5c8334954..58a3c44ecf 100644 --- a/internal/status/updater_test.go +++ b/internal/status/updater_test.go @@ -40,9 +40,9 @@ var _ = Describe("Updater", func() { WithScheme(scheme). Build() - // Rfc3339Copy() removes the monotonic clock reading - // We need to remove it, because updating the status in the FakeClient and then getting the resource back - // involves encoding and decoding the resource to/from JSON, which removes the monotonic clock reading. + // Rfc3339Copy() removes the monotonic clock reading and leaves only second-level precision. + // We use it because updating the status in the FakeClient and then getting the resource back + // involves encoding and decoding the resource to/from JSON, which uses RFC 3339 for metav1.Time. fakeClockTime = metav1.NewTime(time.Now()).Rfc3339Copy() fakeClock := &statusfakes.FakeClock{} fakeClock.NowReturns(fakeClockTime)