From b3bc6df4e480be6addb7e47b0cd12e512b497262 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Sun, 2 Mar 2025 13:28:34 +0200 Subject: [PATCH] session: fix test timestamp Before we add the SQL implementation of the store, we fix this timestamp to be a more realistic number. This is needed since in sqlite, timestamps are serialised as strings and golang actually cant parse the string for the current timestamp back into a time.Time. This is the error that will be encountered: `parsing time "99999-01-01 00:00:00 +0000 UTC" as "2006-01-02 15:04:05.999999999 -0700 MST": cannot parse "9-01-01 00:00:00 +0000 UTC" as "-"` --- session/store_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session/store_test.go b/session/store_test.go index 71937ebb..a853a613 100644 --- a/session/store_test.go +++ b/session/store_test.go @@ -362,7 +362,7 @@ func reserveSession(db Store, label string, return db.NewSession( context.Background(), label, opts.sessType, - time.Date(99999, 1, 1, 0, 0, 0, 0, time.UTC), + time.Date(9999, 1, 1, 0, 0, 0, 0, time.UTC), "foo.bar.baz:1234", WithDevServer(), WithPrivacy(PrivacyFlags{ClearPubkeys}),