From 74517d73154ecdf045aad3fedcf47d66499b5548 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 30 Jan 2021 13:03:56 -0600 Subject: [PATCH] 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) --- config_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_test.go b/config_test.go index f6391672..e869422d 100644 --- a/config_test.go +++ b/config_test.go @@ -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)