Use WeakDecode to decode the initialize values (#2871)

This commit is contained in:
Brian Kassouf
2017-06-14 18:59:27 -07:00
committed by GitHub
parent 4dea784fac
commit b9871fc9ad
7 changed files with 52 additions and 4 deletions

View File

@@ -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) {