Update postgres DSN

This commit is contained in:
Jinzhu 2020-07-16 17:15:57 +08:00
parent 2595402507
commit e83e210971
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ jobs:
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
- name: Tests
run: GORM_DIALECT=postgres GORM_DSN="user=gorm password=gorm DB.name=gorm host=localhost port=9920 sslmode=disable TimeZone=Asia/Shanghai" ./tests/tests_all.sh
run: GORM_DIALECT=postgres GORM_DSN="user=gorm password=gorm dbname=gorm host=localhost port=9920 sslmode=disable TimeZone=Asia/Shanghai" ./tests/tests_all.sh
sqlserver:
strategy:

View File

@ -52,7 +52,7 @@ func OpenTestConnection() (db *gorm.DB, err error) {
case "postgres":
log.Println("testing postgres...")
if dbDSN == "" {
dbDSN = "user=gorm password=gorm DB.name=gorm host=localhost port=9920 sslmode=disable TimeZone=Asia/Shanghai"
dbDSN = "user=gorm password=gorm dbname=gorm host=localhost port=9920 sslmode=disable TimeZone=Asia/Shanghai"
}
db, err = gorm.Open(postgres.New(postgres.Config{
DSN: dbDSN,