We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 397e2f5 commit 047b7c2Copy full SHA for 047b7c2
dsn_test.go
@@ -130,6 +130,11 @@ func TestDSNReformat(t *testing.T) {
130
res1 := fmt.Sprintf("%+v", cfg1)
131
132
dsn2 := cfg1.FormatDSN()
133
+ if dsn2 != dsn1 {
134
+ // Just log
135
+ t.Logf("%d. %q reformated as %q", i, dsn1, dsn2)
136
+ }
137
+
138
cfg2, err := ParseDSN(dsn2)
139
if err != nil {
140
t.Error(err.Error())
@@ -139,8 +144,14 @@ func TestDSNReformat(t *testing.T) {
144
res2 := fmt.Sprintf("%+v", cfg2)
145
141
146
if res1 != res2 {
147
+ t.Errorf("%d. %q does not match %q", i, dsn2, dsn1)
142
148
t.Errorf("%d. %q does not match %q", i, res2, res1)
143
149
}
150
151
+ dsn3 := cfg2.FormatDSN()
152
+ if dsn3 != dsn2 {
153
+ t.Errorf("%d. %q does not match %q", i, dsn2, dsn3)
154
155
})
156
157
0 commit comments