From d5d6ad406f47ae738a7f6b1699b3b6e7ef916bb9 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Thu, 17 Aug 2023 17:26:21 +0100 Subject: [bugfix] fix double firing bun.DB query hooks (#2124) * improve bun.DB wrapping readability + comments, fix double-firing query hooks * fix incorrect code comment placement * fix linter issues * Update internal/db/basic.go * do as the linter commmands ... --------- Signed-off-by: kim Co-authored-by: Daenney --- internal/api/fileserver/fileserver_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'internal/api/fileserver/fileserver_test.go') diff --git a/internal/api/fileserver/fileserver_test.go b/internal/api/fileserver/fileserver_test.go index 709458b1a..e57b86082 100644 --- a/internal/api/fileserver/fileserver_test.go +++ b/internal/api/fileserver/fileserver_test.go @@ -18,8 +18,6 @@ package fileserver_test import ( - "context" - "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/fileserver" "github.com/superseriousbusiness/gotosocial/internal/db" @@ -111,7 +109,7 @@ func (suite *FileserverTestSuite) SetupTest() { } func (suite *FileserverTestSuite) TearDownSuite() { - if err := suite.db.Stop(context.Background()); err != nil { + if err := suite.db.Close(); err != nil { log.Panicf(nil, "error closing db connection: %s", err) } testrig.StopWorkers(&suite.state) -- cgit v1.2.3