2
0

Add ConnStr getter to Pool and Conn structs.

This commit is contained in:
georgysavva
2020-05-16 18:10:29 +03:00
parent 1b54d15e93
commit a62de87342
5 changed files with 29 additions and 3 deletions
+3 -2
View File
@@ -14,9 +14,10 @@ import (
func TestConnect(t *testing.T) {
t.Parallel()
pool, err := pgxpool.Connect(context.Background(), os.Getenv("PGX_TEST_DATABASE"))
connStr := os.Getenv("PGX_TEST_DATABASE")
pool, err := pgxpool.Connect(context.Background(), connStr)
require.NoError(t, err)
assert.Equal(t, connStr, pool.ConnStr())
pool.Close()
}