Removed Postgre Close test since the pgx implementation of Close() doesn't return an error,

Removed Storage.Close()'s return method since the pgx implementation of Close() doesn't return an error,
Removed Config.maxIdleConns since pgx implementation doesn't support setting a maximum number of idle connections
This commit is contained in:
Technerder
2021-07-02 18:04:33 -04:00
parent f0233feaea
commit 85e612ec79
4 changed files with 35 additions and 48 deletions

View File

@@ -1,6 +1,7 @@
package postgres
import (
"context"
"database/sql"
"os"
"testing"
@@ -133,7 +134,7 @@ func Test_Postgres_GC(t *testing.T) {
utils.AssertEqual(t, nil, err)
testStore.gc(time.Now())
row := testStore.db.QueryRow(testStore.sqlSelect, "john")
row := testStore.db.QueryRow(context.Background(), testStore.sqlSelect, "john")
err = row.Scan(nil, nil)
utils.AssertEqual(t, sql.ErrNoRows, err)
@@ -173,7 +174,3 @@ func Test_SslRequiredMode(t *testing.T) {
SslMode: "require",
})
}
func Test_Postgres_Close(t *testing.T) {
utils.AssertEqual(t, nil, testStore.Close())
}