Config Array Syntax (#8204)

* refactor util encryption library so it doesn't have to import log

* add util.SplitString to handle space and/or comma-separated config lines

* go fmt
This commit is contained in:
Dan Cech
2017-04-25 09:14:29 +02:00
committed by Torkel Ödegaard
parent d085aaad41
commit b489e93d94
11 changed files with 80 additions and 27 deletions
+8 -3
View File
@@ -54,10 +54,15 @@ func TestDataSourceCache(t *testing.T) {
})
ds.JsonData = json
tlsCaCert, _ := util.Encrypt([]byte(caCert), "password")
tlsClientCert, _ := util.Encrypt([]byte(clientCert), "password")
tlsClientKey, _ := util.Encrypt([]byte(clientKey), "password")
ds.SecureJsonData = map[string][]byte{
"tlsCACert": util.Encrypt([]byte(caCert), "password"),
"tlsClientCert": util.Encrypt([]byte(clientCert), "password"),
"tlsClientKey": util.Encrypt([]byte(clientKey), "password"),
"tlsCACert": tlsCaCert,
"tlsClientCert": tlsClientCert,
"tlsClientKey": tlsClientKey,
}
ds.Updated = t.Add(-1 * time.Minute)