diff --git a/builtin/logical/mssql/backend_test.go b/builtin/logical/mssql/backend_test.go index e75daa144..de4ebb327 100644 --- a/builtin/logical/mssql/backend_test.go +++ b/builtin/logical/mssql/backend_test.go @@ -45,6 +45,7 @@ func TestBackend_config_connection(t *testing.T) { t.Fatalf("err:%s resp:%#v\n", err, resp) } + delete(configData, "verify_connection") if !reflect.DeepEqual(configData, resp.Data) { t.Fatalf("bad: expected:%#v\nactual:%#v\n", configData, resp.Data) } diff --git a/builtin/logical/mssql/path_config_connection.go b/builtin/logical/mssql/path_config_connection.go index d9c36ce0e..5caed5625 100644 --- a/builtin/logical/mssql/path_config_connection.go +++ b/builtin/logical/mssql/path_config_connection.go @@ -87,7 +87,6 @@ func (b *backend) pathConnectionWrite(req *logical.Request, data *framework.Fiel entry, err := logical.StorageEntryJSON("config/connection", connectionConfig{ ConnectionString: connString, MaxOpenConnections: maxOpenConns, - VerifyConnection: verifyConnection, }) if err != nil { return nil, err @@ -108,7 +107,6 @@ func (b *backend) pathConnectionWrite(req *logical.Request, data *framework.Fiel type connectionConfig struct { ConnectionString string `json:"connection_string" structs:"connection_string" mapstructure:"connection_string"` MaxOpenConnections int `json:"max_open_connections" structs:"max_open_connections" mapstructure:"max_open_connections"` - VerifyConnection bool `json:"verify_connection" structs:"verify_connection" mapstructure:"verify_connection"` } const pathConfigConnectionHelpSyn = ` diff --git a/builtin/logical/mysql/backend_test.go b/builtin/logical/mysql/backend_test.go index 4ce8cbec8..888de9ac1 100644 --- a/builtin/logical/mysql/backend_test.go +++ b/builtin/logical/mysql/backend_test.go @@ -103,6 +103,7 @@ func TestBackend_config_connection(t *testing.T) { t.Fatalf("err:%s resp:%#v\n", err, resp) } + delete(configData, "verify_connection") if !reflect.DeepEqual(configData, resp.Data) { t.Fatalf("bad: expected:%#v\nactual:%#v\n", configData, resp.Data) } diff --git a/builtin/logical/mysql/path_config_connection.go b/builtin/logical/mysql/path_config_connection.go index 4c4c4bb47..70ab292d4 100644 --- a/builtin/logical/mysql/path_config_connection.go +++ b/builtin/logical/mysql/path_config_connection.go @@ -101,7 +101,6 @@ func (b *backend) pathConnectionWrite( entry, err := logical.StorageEntryJSON("config/connection", connectionConfig{ ConnectionURL: connURL, MaxOpenConnections: maxOpenConns, - VerifyConnection: verifyConnection, }) if err != nil { return nil, err @@ -124,7 +123,6 @@ type connectionConfig struct { // Deprecate "value" in coming releases ConnectionString string `json:"value" structs:"value" mapstructure:"value"` MaxOpenConnections int `json:"max_open_connections" structs:"max_open_connections" mapstructure:"max_open_connections"` - VerifyConnection bool `json:"verify_connection" structs:"verify_connection" mapstructure:"verify_connection"` } const pathConfigConnectionHelpSyn = ` diff --git a/builtin/logical/postgresql/backend_test.go b/builtin/logical/postgresql/backend_test.go index 7e3719114..53b4f827b 100644 --- a/builtin/logical/postgresql/backend_test.go +++ b/builtin/logical/postgresql/backend_test.go @@ -5,11 +5,11 @@ import ( "fmt" "log" "os" + "path" "reflect" "sync" "testing" "time" - "path" "github.com/hashicorp/vault/logical" logicaltest "github.com/hashicorp/vault/logical/testing" @@ -107,6 +107,7 @@ func TestBackend_config_connection(t *testing.T) { t.Fatalf("err:%s resp:%#v\n", err, resp) } + delete(configData, "verify_connection") if !reflect.DeepEqual(configData, resp.Data) { t.Fatalf("bad: expected:%#v\nactual:%#v\n", configData, resp.Data) } @@ -183,7 +184,7 @@ func TestBackend_roleReadOnly(t *testing.T) { } logicaltest.Test(t, logicaltest.TestCase{ - Backend: b, + Backend: b, Steps: []logicaltest.TestStep{ testAccStepConfig(t, connData, false), testAccStepCreateRole(t, "web", testRole), @@ -329,7 +330,6 @@ func testAccStepReadCreds(t *testing.T, b logical.Backend, s logical.Storage, na } } - func testAccStepCreateTable(t *testing.T, b logical.Backend, s logical.Storage, name string, connURL string) logicaltest.TestStep { return logicaltest.TestStep{ Operation: logical.ReadOperation, diff --git a/builtin/logical/postgresql/path_config_connection.go b/builtin/logical/postgresql/path_config_connection.go index 2617c0391..577c296df 100644 --- a/builtin/logical/postgresql/path_config_connection.go +++ b/builtin/logical/postgresql/path_config_connection.go @@ -124,7 +124,6 @@ func (b *backend) pathConnectionWrite( ConnectionURL: connURL, MaxOpenConnections: maxOpenConns, MaxIdleConnections: maxIdleConns, - VerifyConnection: verifyConnection, }) if err != nil { return nil, err @@ -148,7 +147,6 @@ type connectionConfig struct { ConnectionString string `json:"value" structs:"value" mapstructure:"value"` MaxOpenConnections int `json:"max_open_connections" structs:"max_open_connections" mapstructure:"max_open_connections"` MaxIdleConnections int `json:"max_idle_connections" structs:"max_idle_connections" mapstructure:"max_idle_connections"` - VerifyConnection bool `json:"verify_connection" structs:"verify_connection" mapstructure:"verify_connection"` } const pathConfigConnectionHelpSyn = `