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

Function dsnQuery

conf/conf_test.go:40–53  ·  view source on GitHub ↗
(t *testing.T, dsn string)

Source from the content-addressed store, hash-verified

38}
39
40func dsnQuery(t *testing.T, dsn string) url.Values {
41 t.Helper()
42
43 index := strings.Index(dsn, "?")
44 if index < 0 {
45 t.Fatalf("expected DSN query string, got %q", dsn)
46 }
47
48 query, err := url.ParseQuery(dsn[index+1:])
49 if err != nil {
50 t.Fatalf("expected parseable DSN query string, got %v", err)
51 }
52 return query
53}
54
55func TestDatabaseDSNRequiresUserAndName(t *testing.T) {
56 setDBEnv(t, map[string]string{})

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected