Fix spelling errors for postgres SSL consts

This commit is contained in:
ionutboangiu
2022-07-13 17:55:20 +03:00
committed by Dan Christian Bogos
parent 62664d3c0d
commit d9487b6a74
3 changed files with 10 additions and 10 deletions

View File

@@ -552,7 +552,7 @@ func TestDfStorDBJsonCfg(t *testing.T) {
MongoQueryTimeout: utils.StringPointer("10s"),
SQLConnMaxLifetime: utils.StringPointer("0"),
MySQLDSNParams: make(map[string]string),
PgSSLMode: utils.StringPointer(utils.PostgressSSLModeDisable),
PgSSLMode: utils.StringPointer(utils.PostgresSSLModeDisable),
MySQLLocation: utils.StringPointer("Local"),
},
Items: &map[string]*ItemOptJson{

View File

@@ -892,9 +892,9 @@ func (cfg *CGRConfig) checkConfigSanity() error {
}
// StorDB sanity checks
if cfg.storDbCfg.Type == utils.Postgres {
if !utils.IsSliceMember([]string{utils.PostgressSSLModeDisable, utils.PostgressSSLModeAllow,
utils.PostgressSSLModePrefer, utils.PostgressSSLModeRequire, utils.PostgressSSLModeVerifyCa,
utils.PostgressSSLModeVerifyFull}, cfg.storDbCfg.Opts.PgSSLMode) {
if !utils.IsSliceMember([]string{utils.PostgresSSLModeDisable, utils.PostgressSSLModeAllow,
utils.PostgresSSLModePrefer, utils.PostgressSSLModeRequire, utils.PostgresSSLModeVerifyCa,
utils.PostgresSSLModeVerifyFull}, cfg.storDbCfg.Opts.PgSSLMode) {
return fmt.Errorf("<%s> unsupported sslmode for storDB", utils.StorDB)
}
}

View File

@@ -1918,12 +1918,12 @@ const (
// StorDB
var (
PostgressSSLModeDisable = "disable"
PostgressSSLModeAllow = "allow"
PostgressSSLModePrefer = "prefer"
PostgressSSLModeRequire = "require"
PostgressSSLModeVerifyCa = "verify-ca"
PostgressSSLModeVerifyFull = "verify-full"
PostgresSSLModeDisable = "disable"
PostgressSSLModeAllow = "allow"
PostgresSSLModePrefer = "prefer"
PostgressSSLModeRequire = "require"
PostgresSSLModeVerifyCa = "verify-ca"
PostgresSSLModeVerifyFull = "verify-full"
)
// GeneralCfg