Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit46e242e

Browse files
authored
test(coderd/database/dbtestutil): add debug output to pg_dump failure (#20209)
1 parent544f155 commit46e242e

File tree

1 file changed

+3
-2
lines changed
  • coderd/database/dbtestutil

1 file changed

+3
-2
lines changed

‎coderd/database/dbtestutil/db.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,11 @@ func PGDump(dbURL string) ([]byte, error) {
242242
"PGCLIENTENCODING=UTF8",
243243
"PGDATABASE=",// we should always specify the database name in the connection string
244244
}
245-
varstdout bytes.Buffer
245+
varstdout,stderr bytes.Buffer
246246
cmd.Stdout=&stdout
247+
cmd.Stderr=&stderr
247248
iferr:=cmd.Run();err!=nil {
248-
returnnil,xerrors.Errorf("exec pg_dump: %w",err)
249+
returnnil,xerrors.Errorf("exec pg_dump: %w\n%s",err,stderr.String())
249250
}
250251
returnstdout.Bytes(),nil
251252
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp