|
| 1 | +//go:build !pq |
1 | 2 | // +build !pq |
2 | 3 |
|
3 | 4 | // Copyright (c) 2012-present The upper.io/db authors. All rights reserved. |
@@ -37,27 +38,27 @@ func TestConnectionURL(t *testing.T) { |
37 | 38 |
|
38 | 39 | // Adding a host with port. |
39 | 40 | c.Host = "localhost:1234" |
40 | | - assert.Equal(t, "host=localhost port=1234 sslmode=disable statement_cache_capacity=0", c.String()) |
| 41 | + assert.Equal(t, "host=localhost port=1234 sslmode=prefer statement_cache_capacity=0", c.String()) |
41 | 42 |
|
42 | 43 | // Adding a host. |
43 | 44 | c.Host = "localhost" |
44 | | - assert.Equal(t, "host=localhost sslmode=disable statement_cache_capacity=0", c.String()) |
| 45 | + assert.Equal(t, "host=localhost sslmode=prefer statement_cache_capacity=0", c.String()) |
45 | 46 |
|
46 | 47 | // Adding a username. |
47 | 48 | c.User = "Anakin" |
48 | | - assert.Equal(t, `host=localhost sslmode=disable statement_cache_capacity=0 user=Anakin`, c.String()) |
| 49 | + assert.Equal(t, `host=localhost sslmode=prefer statement_cache_capacity=0 user=Anakin`, c.String()) |
49 | 50 |
|
50 | 51 | // Adding a password with special characters. |
51 | 52 | c.Password = "Some Sort of ' Password" |
52 | | - assert.Equal(t, `host=localhost password=Some\ Sort\ of\ \'\ Password sslmode=disable statement_cache_capacity=0 user=Anakin`, c.String()) |
| 53 | + assert.Equal(t, `host=localhost password=Some\ Sort\ of\ \'\ Password sslmode=prefer statement_cache_capacity=0 user=Anakin`, c.String()) |
53 | 54 |
|
54 | 55 | // Adding a port. |
55 | 56 | c.Host = "localhost:1234" |
56 | | - assert.Equal(t, `host=localhost password=Some\ Sort\ of\ \'\ Password port=1234 sslmode=disable statement_cache_capacity=0 user=Anakin`, c.String()) |
| 57 | + assert.Equal(t, `host=localhost password=Some\ Sort\ of\ \'\ Password port=1234 sslmode=prefer statement_cache_capacity=0 user=Anakin`, c.String()) |
57 | 58 |
|
58 | 59 | // Adding a database. |
59 | 60 | c.Database = "MyDatabase" |
60 | | - assert.Equal(t, `dbname=MyDatabase host=localhost password=Some\ Sort\ of\ \'\ Password port=1234 sslmode=disable statement_cache_capacity=0 user=Anakin`, c.String()) |
| 61 | + assert.Equal(t, `dbname=MyDatabase host=localhost password=Some\ Sort\ of\ \'\ Password port=1234 sslmode=prefer statement_cache_capacity=0 user=Anakin`, c.String()) |
61 | 62 |
|
62 | 63 | // Adding options. |
63 | 64 | c.Options = map[string]string{ |
|
0 commit comments