(t *testing.T)
| 163 | } |
| 164 | |
| 165 | func TestDatabaseDSNAllowsAtSignInUser(t *testing.T) { |
| 166 | setDBEnv(t, map[string]string{ |
| 167 | "DB_USER": "app@server", |
| 168 | "DB_NAME": "singo", |
| 169 | }) |
| 170 | |
| 171 | dsn, err := DatabaseDSN() |
| 172 | if err != nil { |
| 173 | t.Fatalf("expected no error, got %v", err) |
| 174 | } |
| 175 | |
| 176 | config := parseConfig(t, dsn) |
| 177 | if config.User != "app@server" { |
| 178 | t.Fatalf("expected user to round-trip, got %q", config.User) |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | func TestDatabaseDSNRejectsReservedCharacters(t *testing.T) { |
| 183 | tests := []struct { |
nothing calls this directly
no test coverage detected