[v11.0.x] PostgreSQL: Fix the verify-ca mode (#85775)

PostgreSQL: Fix the verify-ca mode (#85530)

postgres: fix the verify-ca problem
(cherry picked from commit 8a15ed42ae)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-04-09 09:28:56 +02:00
committed by GitHub
parent 7ac14ff217
commit 9d01858763
2 changed files with 17 additions and 0 deletions
@@ -57,6 +57,15 @@ func TestIntegrationGenerateConnectionString(t *testing.T) {
tlsSettings: tlsSettings{Mode: "verify-full"},
expConnStr: "user='user' password='password' host='host' dbname='database' sslmode='verify-full'",
},
{
desc: "verify-ca automatically adds disable-sni",
host: "host:1234",
user: "user",
password: "password",
database: "database",
tlsSettings: tlsSettings{Mode: "verify-ca"},
expConnStr: "user='user' password='password' host='host' dbname='database' port=1234 sslmode='verify-ca' sslsni=0",
},
{
desc: "TCP/port host",
host: "host:1234",