Unverified Commit f2d98fc0 authored by Wesley Liddick's avatar Wesley Liddick Committed by GitHub
Browse files

Merge pull request #1077 from Clov614/main

fix(auto setup): 修复初始测试连接硬编码问题导致使用自定义数据库测试失败无法执行 auto setup流程
parents 2b41cec8 47b74885
...@@ -164,8 +164,8 @@ func NeedsSetup() bool { ...@@ -164,8 +164,8 @@ func NeedsSetup() bool {
func TestDatabaseConnection(cfg *DatabaseConfig) error { func TestDatabaseConnection(cfg *DatabaseConfig) error {
// First, connect to the default 'postgres' database to check/create target database // First, connect to the default 'postgres' database to check/create target database
defaultDSN := fmt.Sprintf( defaultDSN := fmt.Sprintf(
"host=%s port=%d user=%s password=%s dbname=postgres sslmode=%s", "host=%s port=%d user=%s password=%s dbname=%s sslmode=%s",
cfg.Host, cfg.Port, cfg.User, cfg.Password, cfg.SSLMode, cfg.Host, cfg.Port, cfg.User, cfg.Password, cfg.DBName, cfg.SSLMode,
) )
db, err := sql.Open("postgres", defaultDSN) db, err := sql.Open("postgres", defaultDSN)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment