(t *testing.T)
| 190 | } |
| 191 | |
| 192 | func TestDSNServerPubKeyQueryEscape(t *testing.T) { |
| 193 | const name = "&%!:" |
| 194 | dsn := "User:password@tcp(localhost:5555)/dbname?serverPubKey=" + url.QueryEscape(name) |
| 195 | |
| 196 | RegisterServerPubKey(name, testPubKeyRSA) |
| 197 | defer DeregisterServerPubKey(name) |
| 198 | |
| 199 | cfg, err := ParseDSN(dsn) |
| 200 | if err != nil { |
| 201 | t.Error(err.Error()) |
| 202 | } |
| 203 | |
| 204 | if cfg.pubKey != testPubKeyRSA { |
| 205 | t.Error("pub key pointer doesn't match") |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | func TestDSNWithCustomTLS(t *testing.T) { |
| 210 | baseDSN := "User:password@tcp(localhost:5555)/dbname?tls=" |
nothing calls this directly
no test coverage detected