mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 07:22:17 +08:00
fix: postgresql ipv6 host should not be enclosed in square brackets (#47522)
This commit is contained in:
@ -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",
|
||||
|
Reference in New Issue
Block a user