fix: postgresql ipv6 host should not be enclosed in square brackets (#47522) (#47619)

(cherry picked from commit 9024340487)

Co-authored-by: felixdoerre <felixdoerre@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-04-12 13:38:44 +01:00
committed by GitHub
co-authored by felixdoerre
parent 31f4d88206
commit ef592f1a66
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -74,7 +74,7 @@ func TestGenerateConnectionString(t *testing.T) {
password: "password",
database: "database",
tlsSettings: tlsSettings{Mode: "verify-full"},
expConnStr: "user='user' password='password' host='[::1]' dbname='database' sslmode='verify-full'",
expConnStr: "user='user' password='password' host='::1' dbname='database' sslmode='verify-full'",
},
{
desc: "Ipv6/port host",
@@ -83,7 +83,7 @@ func TestGenerateConnectionString(t *testing.T) {
password: "password",
database: "database",
tlsSettings: tlsSettings{Mode: "verify-full"},
expConnStr: "user='user' password='password' host='[::1]' dbname='database' port=1234 sslmode='verify-full'",
expConnStr: "user='user' password='password' host='::1' dbname='database' port=1234 sslmode='verify-full'",
},
{
desc: "Invalid port",