(t *testing.T, dsn string)
| 38 | } |
| 39 | |
| 40 | func 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 | |
| 55 | func TestDatabaseDSNRequiresUserAndName(t *testing.T) { |
| 56 | setDBEnv(t, map[string]string{}) |
no outgoing calls
no test coverage detected