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 "-"`
This commit is contained in:
Elle Mouton 2025-03-02 13:28:34 +02:00
parent 306519fd6d
commit b3bc6df4e4
No known key found for this signature in database
GPG key ID: D7D916376026F177

View file

@ -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}),