cmd/govulncheck: updates cache unit test

Addresses some build.golang.org failures. Retrieval time should be
compared for equality too.

Fixes #52083

Change-Id: I9e82e1f8011b3ab542bfdee2f405239467f2d6f1
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/397314
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Bryan Mills <bcmills@google.com>
Trust: Zvonimir Pavlinovic <zpavlinovic@google.com>
diff --git a/cmd/govulncheck/cache_test.go b/cmd/govulncheck/cache_test.go
index 09c8f11..3e5609d 100644
--- a/cmd/govulncheck/cache_test.go
+++ b/cmd/govulncheck/cache_test.go
@@ -146,8 +146,8 @@
 			}
 
 			// sanity checking
-			if rt, ok := idx[p]; ok && !start.Before(rt) {
-				return fmt.Errorf("unexpected past time in index: start %v not before %v", start, rt)
+			if rt, ok := idx[p]; ok && rt.Before(start) {
+				return fmt.Errorf("unexpected past time in index: %v before start %v", rt, start)
 			}
 
 			now := time.Now()