Skip to content

Commit

Permalink
improve error logs when creating test db (#6702)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 authored May 31, 2022
1 parent d3c9eb7 commit 257e7e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/internal/cltest/heavyweight/orm.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ func dropAndCreateThrowawayTestDB(parsed url.URL, postfix string, empty bool) (s
parsed.Path = "/postgres"
db, err := sql.Open(string(dialects.Postgres), parsed.String())
if err != nil {
return "", fmt.Errorf("unable to open postgres database for creating test db: %+v", err)
return "", fmt.Errorf("In order to drop the test database, we need to connect to a separate database"+
" called 'postgres'. But we are unable to open 'postgres' database: %+v\n", err)
}
defer db.Close()

Expand Down

0 comments on commit 257e7e8

Please sign in to comment.