mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-04 20:47:50 +00:00
Use WeakDecode to decode the initialize values (#2871)
This commit is contained in:
@@ -63,7 +63,8 @@ func TestPostgreSQL_Initialize(t *testing.T) {
|
||||
defer cleanup()
|
||||
|
||||
connectionDetails := map[string]interface{}{
|
||||
"connection_url": connURL,
|
||||
"connection_url": connURL,
|
||||
"max_open_connections": 5,
|
||||
}
|
||||
|
||||
dbRaw, _ := New()
|
||||
@@ -84,6 +85,18 @@ func TestPostgreSQL_Initialize(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
// Test decoding a string value for max_open_connections
|
||||
connectionDetails = map[string]interface{}{
|
||||
"connection_url": connURL,
|
||||
"max_open_connections": "5",
|
||||
}
|
||||
|
||||
err = db.Initialize(connectionDetails, true)
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestPostgreSQL_CreateUser(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user