Skip to content

Commit

Permalink
fix(config): fix the getDBConnStr method replacing the default ssl mode
Browse files Browse the repository at this point in the history
  • Loading branch information
danvergara committed May 1, 2021
1 parent 1a5de52 commit a0706df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (c *Config) GetTestDBConnStr() string {
func (c *Config) getDBConnStr(dbhost, dbname string) string {
switch c.dbDriver {
case "postgres":
return fmt.Sprintf("%s://%s:%s@%s:%s/%s?sslmode=mode", c.dbDriver, c.dbUser, c.dbPswd, dbhost, c.dbPort, dbname)
return fmt.Sprintf("%s://%s:%s@%s:%s/%s?sslmode=disable", c.dbDriver, c.dbUser, c.dbPswd, dbhost, c.dbPort, dbname)
case "mysql":
return fmt.Sprintf("%s://%s:%s@tcp(%s:%s)/%s", c.dbDriver, c.dbUser, c.dbPswd, dbhost, c.dbPort, dbname)
default:
Expand Down

0 comments on commit a0706df

Please sign in to comment.