| 331 | } |
| 332 | |
| 333 | func TestParamsAreSorted(t *testing.T) { |
| 334 | expected := "/dbname?interpolateParams=true&foobar=baz&quux=loo" |
| 335 | cfg := NewConfig() |
| 336 | cfg.DBName = "dbname" |
| 337 | cfg.InterpolateParams = true |
| 338 | cfg.Params = map[string]string{ |
| 339 | "quux": "loo", |
| 340 | "foobar": "baz", |
| 341 | } |
| 342 | actual := cfg.FormatDSN() |
| 343 | if actual != expected { |
| 344 | t.Errorf("generic Config.Params were not sorted: want %#v, got %#v", expected, actual) |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | func TestCloneConfig(t *testing.T) { |
| 349 | RegisterServerPubKey("testKey", testPubKeyRSA) |