2
0

Use environment variables for test configuration

This commit is contained in:
Jack Christensen
2018-12-30 21:52:33 -06:00
parent 67a15e6f7f
commit c672c0d595
22 changed files with 245 additions and 253 deletions
+3 -2
View File
@@ -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)
}