mirror of
https://github.com/gofiber/storage.git
synced 2025-10-06 09:07:14 +08:00
fix tests
This commit is contained in:
@@ -2,12 +2,12 @@ package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/utils"
|
||||
"github.com/jackc/pgx/v5"
|
||||
)
|
||||
|
||||
var testStore = New(Config{
|
||||
@@ -136,7 +136,7 @@ func Test_Postgres_GC(t *testing.T) {
|
||||
testStore.gc(time.Now())
|
||||
row := testStore.db.QueryRow(context.Background(), testStore.sqlSelect, "john")
|
||||
err = row.Scan(nil, nil)
|
||||
utils.AssertEqual(t, sql.ErrNoRows, err)
|
||||
utils.AssertEqual(t, pgx.ErrNoRows, err)
|
||||
|
||||
// This key should not expire
|
||||
err = testStore.Set("john", testVal, 0)
|
||||
|
Reference in New Issue
Block a user