File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ func init() {
52
52
// drop references to lib/pq and relay on pgx
53
53
dburl .Unregister ("postgres" )
54
54
dburl .RegisterAlias ("pgx" , "postgres" )
55
+ dburl .RegisterAlias ("pgx" , "postgresql" )
55
56
}
56
57
57
58
// Open opens a connection to the db
Original file line number Diff line number Diff line change @@ -34,6 +34,31 @@ func TestParse(t *testing.T) {
34
34
driver : SQLite ,
35
35
dsn : "flipt.db?_fk=true&cache=shared&mode=rwc" ,
36
36
},
37
+ {
38
+ name : "postgresql url" ,
39
+ cfg : config.DatabaseConfig {
40
+ URL : "postgresql://postgres@localhost:5432/flipt?sslmode=disable" ,
41
+ },
42
+ driver : Postgres ,
43
+ dsn : "postgres://postgres@localhost:5432/flipt?binary_parameters=yes&sslmode=disable" ,
44
+ },
45
+ {
46
+ name : "postgresql url prepared statements enabled" ,
47
+ cfg : config.DatabaseConfig {
48
+ URL : "postgresql://postgres@localhost:5432/flipt?sslmode=disable" ,
49
+ PreparedStatementsEnabled : true ,
50
+ },
51
+ driver : Postgres ,
52
+ dsn : "postgres://postgres@localhost:5432/flipt?sslmode=disable" ,
53
+ },
54
+ {
55
+ name : "postgresql no disable sslmode" ,
56
+ cfg : config.DatabaseConfig {
57
+ URL : "postgresql://postgres@localhost:5432/flipt" ,
58
+ },
59
+ driver : Postgres ,
60
+ dsn : "postgres://postgres@localhost:5432/flipt?binary_parameters=yes" ,
61
+ },
37
62
{
38
63
name : "postgres url prepared statements enabled" ,
39
64
cfg : config.DatabaseConfig {
You can’t perform that action at this time.
0 commit comments