2
0

Fix test when PGSSLMODE=disable

When PGSSLMODE=disable no fallback config was created which would cause
the check that fallbacks are deep copied to crash on:

copied.Fallbacks[0].Port = uint16(5433)
This commit is contained in:
Jack Christensen
2021-01-30 13:03:56 -06:00
parent 120139a206
commit 74517d7315
+1 -1
View File
@@ -564,7 +564,7 @@ func TestConfigCopyReturnsEqualConfig(t *testing.T) {
}
func TestConfigCopyOriginalConfigDidNotChange(t *testing.T) {
connString := "postgres://jack:secret@localhost:5432/mydb?application_name=pgxtest&search_path=myschema&connect_timeout=5"
connString := "postgres://jack:secret@localhost:5432/mydb?application_name=pgxtest&search_path=myschema&connect_timeout=5&sslmode=prefer"
original, err := pgconn.ParseConfig(connString)
require.NoError(t, err)