MCPcopy
hub / github.com/gourouting/singo / setDBEnv

Function setDBEnv

conf/conf_test.go:11–28  ·  view source on GitHub ↗
(t *testing.T, values map[string]string)

Source from the content-addressed store, hash-verified

9)
10
11func setDBEnv(t *testing.T, values map[string]string) {
12 t.Helper()
13
14 keys := []string{
15 "DB_USER",
16 "DB_PASSWORD",
17 "DB_HOST",
18 "DB_PORT",
19 "DB_NAME",
20 "DB_CHARSET",
21 "DB_PARSE_TIME",
22 "DB_LOC",
23 }
24
25 for _, key := range keys {
26 t.Setenv(key, values[key])
27 }
28}
29
30func parseConfig(t *testing.T, dsn string) *mysql.Config {
31 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected