Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions dsn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ func TestDSNReformat(t *testing.T) {
res1 := fmt.Sprintf("%+v", cfg1)

dsn2 := cfg1.FormatDSN()
if dsn2 != dsn1 {
// Just log
t.Logf("%d. %q reformated as %q", i, dsn1, dsn2)
}

cfg2, err := ParseDSN(dsn2)
if err != nil {
t.Error(err.Error())
Expand All @@ -141,6 +146,11 @@ func TestDSNReformat(t *testing.T) {
if res1 != res2 {
t.Errorf("%d. %q does not match %q", i, res2, res1)
}

dsn3 := cfg2.FormatDSN()
if dsn3 != dsn2 {
t.Errorf("%d. %q does not match %q", i, dsn2, dsn3)
}
})
}
}
Expand Down