Skip to content

Commit 4877f7e

Browse files
authored
Correct explanatory comment about time (#296)
1 parent 2663eb4 commit 4877f7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/status/updater_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ var _ = Describe("Updater", func() {
4040
WithScheme(scheme).
4141
Build()
4242

43-
// Rfc3339Copy() removes the monotonic clock reading
44-
// We need to remove it, because updating the status in the FakeClient and then getting the resource back
45-
// involves encoding and decoding the resource to/from JSON, which removes the monotonic clock reading.
43+
// Rfc3339Copy() removes the monotonic clock reading and leaves only second-level precision.
44+
// We use it because updating the status in the FakeClient and then getting the resource back
45+
// involves encoding and decoding the resource to/from JSON, which uses RFC 3339 for metav1.Time.
4646
fakeClockTime = metav1.NewTime(time.Now()).Rfc3339Copy()
4747
fakeClock := &statusfakes.FakeClock{}
4848
fakeClock.NowReturns(fakeClockTime)

0 commit comments

Comments
 (0)