mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-24 02:28:16 +08:00
Fix incorrect PostgreSQL connection string for Unix sockets (#28865)
Fix #28864
This commit is contained in:
@ -77,6 +77,14 @@ func Test_getPostgreSQLConnectionString(t *testing.T) {
|
||||
SSLMode: "false",
|
||||
Output: "postgres://testuser:space%20space%20%21%23$%25%5E%5E%25%5E%60%60%60-=%3F=@:5432/gitea?host=%2Ftmp%2Fpg.sock&sslmode=false",
|
||||
},
|
||||
{
|
||||
Host: "/tmp/pg.sock:6432",
|
||||
User: "testuser",
|
||||
Passwd: "pass",
|
||||
Name: "gitea",
|
||||
SSLMode: "false",
|
||||
Output: "postgres://testuser:pass@:6432/gitea?host=%2Ftmp%2Fpg.sock&sslmode=false",
|
||||
},
|
||||
{
|
||||
Host: "localhost",
|
||||
User: "pgsqlusername",
|
||||
|
Reference in New Issue
Block a user