From 32350bd1dc3288aa22f271f87065741da0a1bdb8 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Mon, 18 Nov 2019 07:28:47 -0600 Subject: [PATCH] TestConnectCustomLookup must test with TCP connection Test (correctly) fails if run on a Unix domain socket. --- pgconn_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pgconn_test.go b/pgconn_test.go index 36499b68..6f330efb 100644 --- a/pgconn_test.go +++ b/pgconn_test.go @@ -191,7 +191,12 @@ func TestConnectCustomDialer(t *testing.T) { func TestConnectCustomLookup(t *testing.T) { t.Parallel() - config, err := pgconn.ParseConfig(os.Getenv("PGX_TEST_CONN_STRING")) + connString := os.Getenv("PGX_TEST_TCP_CONN_STRING") + if connString == "" { + t.Skipf("Skipping due to missing environment variable %v", "PGX_TEST_TCP_CONN_STRING") + } + + config, err := pgconn.ParseConfig(connString) require.NoError(t, err) looked := false