Use environment variables for test configuration
This commit is contained in:
@@ -3,6 +3,7 @@ package pgx_test
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/jackc/pgx"
|
||||
@@ -11,7 +12,7 @@ import (
|
||||
func TestLargeObjects(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
conn, err := pgx.ConnectConfig(context.Background(), defaultConnConfig)
|
||||
conn, err := pgx.Connect(context.Background(), os.Getenv("PGX_TEST_DATABASE"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -124,7 +125,7 @@ func TestLargeObjects(t *testing.T) {
|
||||
func TestLargeObjectsMultipleTransactions(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
conn, err := pgx.ConnectConfig(context.Background(), defaultConnConfig)
|
||||
conn, err := pgx.Connect(context.Background(), os.Getenv("PGX_TEST_DATABASE"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user