Another test fixup

This commit is contained in:
David Robertson 2023-06-19 16:49:37 +01:00
parent 0c4dd11bba
commit af852c22d1
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD

View File

@ -29,10 +29,10 @@ func TestTokensTable(t *testing.T) {
aliceToken1FirstSeen := time.Now() aliceToken1FirstSeen := time.Now()
var aliceToken, reinsertedToken *Token var aliceToken, reinsertedToken *Token
_ = sqlutil.WithTransaction(db, func(txn *sqlx.Tx) error { _ = sqlutil.WithTransaction(db, func(txn *sqlx.Tx) (err error) {
// Test a single token // Test a single token
t.Log("Insert a new token from Alice.") t.Log("Insert a new token from Alice.")
aliceToken, err := tokens.Insert(txn, aliceSecret1, alice, aliceDevice, aliceToken1FirstSeen) aliceToken, err = tokens.Insert(txn, aliceSecret1, alice, aliceDevice, aliceToken1FirstSeen)
if err != nil { if err != nil {
t.Fatalf("Failed to Insert token: %s", err) t.Fatalf("Failed to Insert token: %s", err)
} }