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

Commitca96e67

Browse files
authored
test: fix incorrectly placed cleanup defer in dbtestutil (#15987)
1 parentcc98bab commitca96e67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎coderd/database/dbtestutil/postgres.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,14 +464,14 @@ func openContainer(t TBSubset, opts DBContainerOptions) (container, func(), erro
464464
// The user is responsible for calling the returned cleanup function.
465465
funcOpenContainerized(tTBSubset,optsDBContainerOptions) (string,func(),error) {
466466
container,containerCleanup,err:=openContainer(t,opts)
467+
iferr!=nil {
468+
return"",nil,xerrors.Errorf("open container: %w",err)
469+
}
467470
deferfunc() {
468471
iferr!=nil {
469472
containerCleanup()
470473
}
471474
}()
472-
iferr!=nil {
473-
return"",nil,xerrors.Errorf("open container: %w",err)
474-
}
475475
dbURL:=ConnectionParams{
476476
Username:"postgres",
477477
Password:"postgres",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp