1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 05:39:42 +02:00

updated vendored deps

This commit is contained in:
Harvey Kandola 2017-08-04 13:42:59 +01:00
parent 0ee2903608
commit 62b7b149c1
22 changed files with 1696 additions and 177 deletions

View file

@ -159,6 +159,8 @@ func TestDSNWithCustomTLS(t *testing.T) {
t.Error(err.Error())
} else if cfg.tls.ServerName != name {
t.Errorf("did not get the correct ServerName (%s) parsing DSN (%s).", name, tst)
} else if tlsCfg.ServerName != "" {
t.Errorf("tlsCfg was mutated ServerName (%s) should be empty parsing DSN (%s).", name, tst)
}
DeregisterTLSConfig("utils_test")
@ -218,6 +220,22 @@ func TestDSNUnsafeCollation(t *testing.T) {
}
}
func TestParamsAreSorted(t *testing.T) {
expected := "/dbname?interpolateParams=true&foobar=baz&quux=loo"
dsn := &Config{
DBName: "dbname",
InterpolateParams: true,
Params: map[string]string{
"quux": "loo",
"foobar": "baz",
},
}
actual := dsn.FormatDSN()
if actual != expected {
t.Errorf("generic Config.Params were not sorted: want %#v, got %#v", expected, actual)
}
}
func BenchmarkParseDSN(b *testing.B) {
b.ReportAllocs()