From e83e21097138e4a3603c5e23e6690fb787ce54df Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Thu, 16 Jul 2020 17:15:57 +0800 Subject: [PATCH] Update postgres DSN --- .github/workflows/tests.yml | 2 +- tests/tests_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0e1cbac3..b626ce94 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: diff --git a/tests/tests_test.go b/tests/tests_test.go index afff2d0f..5aedc061 100644 --- a/tests/tests_test.go +++ b/tests/tests_test.go @@ -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,