From d9487b6a7474c44bb9bf63ecfd86103494adf7d5 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Wed, 13 Jul 2022 17:55:20 +0300 Subject: [PATCH] Fix spelling errors for postgres SSL consts --- config/config_json_test.go | 2 +- config/configsanity.go | 6 +++--- utils/consts.go | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/config_json_test.go b/config/config_json_test.go index 043bb9381..f06bc8c6e 100644 --- a/config/config_json_test.go +++ b/config/config_json_test.go @@ -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{ diff --git a/config/configsanity.go b/config/configsanity.go index 42e9669ed..a44cb5754 100644 --- a/config/configsanity.go +++ b/config/configsanity.go @@ -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) } } diff --git a/utils/consts.go b/utils/consts.go index 0ebe19fc1..ba4e54c8c 100644 --- a/utils/consts.go +++ b/utils/consts.go @@ -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