summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/lib/pq/conn_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/lib/pq/conn_test.go')
-rw-r--r--vendor/github.com/lib/pq/conn_test.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/vendor/github.com/lib/pq/conn_test.go b/vendor/github.com/lib/pq/conn_test.go
index 274147c27..592860f8a 100644
--- a/vendor/github.com/lib/pq/conn_test.go
+++ b/vendor/github.com/lib/pq/conn_test.go
@@ -138,6 +138,10 @@ func TestOpenURL(t *testing.T) {
const pgpass_file = "/tmp/pqgotest_pgpass"
func TestPgpass(t *testing.T) {
+ if os.Getenv("TRAVIS") != "true" {
+ t.Skip("not running under Travis, skipping pgpass tests")
+ }
+
testAssert := func(conninfo string, expected string, reason string) {
conn, err := openTestConnConninfo(conninfo)
if err != nil {
@@ -186,7 +190,17 @@ localhost:*:*:*:pass_C
pgpass.Close()
assertPassword := func(extra values, expected string) {
- o := &values{"host": "localhost", "sslmode": "disable", "connect_timeout": "20", "user": "majid", "port": "5432", "extra_float_digits": "2", "dbname": "pqgotest", "client_encoding": "UTF8", "datestyle": "ISO, MDY"}
+ o := &values{
+ "host": "localhost",
+ "sslmode": "disable",
+ "connect_timeout": "20",
+ "user": "majid",
+ "port": "5432",
+ "extra_float_digits": "2",
+ "dbname": "pqgotest",
+ "client_encoding": "UTF8",
+ "datestyle": "ISO, MDY",
+ }
for k, v := range extra {
(*o)[k] = v
}