mirror of https://github.com/jackc/pgx.git
18 lines
297 B
Go
18 lines
297 B
Go
package pqx
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestConnect(t *testing.T) {
|
|
conn, err := Connect(map[string]string{"socket": "/private/tmp/.s.PGSQL.5432"})
|
|
if err != nil {
|
|
t.Fatal("Unable to establish connection")
|
|
}
|
|
|
|
err = conn.Close()
|
|
if err != nil {
|
|
t.Fatal("Unable to close connection")
|
|
}
|
|
}
|