fix tests

This commit is contained in:
Muhammed Efe Çetin
2022-11-04 19:40:38 +03:00
parent 1fc6144cc0
commit 4b273b74cb
4 changed files with 9 additions and 5 deletions

View File

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