Got insert testing in a better state
* Split up insert function for testing * Add DBType to global state * Move test reflection helpers to testing.go * Add incremental seed to randomizeField to avoid duplicate constraint error messages * Fixed Viper SSL default bug * Fixed pgpass SSL inclusion bug * Add MakeStringMap strmangle helper * Change test errors from error to skip
This commit is contained in:
parent
f054f2f754
commit
4036786b6a
25 changed files with 778 additions and 781 deletions
6
main.go
6
main.go
|
@ -119,6 +119,12 @@ func preRun(cmd *cobra.Command, args []string) error {
|
|||
SSLMode: viper.GetString("postgres.sslmode"),
|
||||
}
|
||||
|
||||
// Set the default SSLMode value
|
||||
if cmdConfig.Postgres.SSLMode == "" {
|
||||
viper.Set("postgres.sslmode", "require")
|
||||
cmdConfig.Postgres.SSLMode = viper.GetString("postgres.sslmode")
|
||||
}
|
||||
|
||||
err = vala.BeginValidation().Validate(
|
||||
vala.StringNotEmpty(cmdConfig.Postgres.User, "postgres.user"),
|
||||
vala.StringNotEmpty(cmdConfig.Postgres.Pass, "postgres.pass"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue