diff options
author | James Fargher <jfargher@gitlab.com> | 2023-07-12 05:57:38 +0300 |
---|---|---|
committer | James Fargher <jfargher@gitlab.com> | 2023-07-12 05:57:38 +0300 |
commit | db1f9b7ab83e264701509fc306285e730931961d (patch) | |
tree | e7d614f9390add8b804112d21bfca1d494af8942 | |
parent | bebbe34c6f3d39d51b0cea420cc65620dead340f (diff) |
backup: Ensure backup.Sink get cleaned up properly in tests
This allows removing the goroutine detection exception.
-rw-r--r-- | internal/backup/sink_test.go | 2 | ||||
-rw-r--r-- | internal/backup/testhelper_test.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/backup/sink_test.go b/internal/backup/sink_test.go index 24ed35ddb..0c40ee6ff 100644 --- a/internal/backup/sink_test.go +++ b/internal/backup/sink_test.go @@ -104,6 +104,8 @@ func TestResolveSink(t *testing.T) { require.EqualError(t, err, tc.errMsg) return } + defer testhelper.MustClose(t, sink) + tc.verify(t, sink) }) } diff --git a/internal/backup/testhelper_test.go b/internal/backup/testhelper_test.go index 2ef254a27..53f50c4ae 100644 --- a/internal/backup/testhelper_test.go +++ b/internal/backup/testhelper_test.go @@ -7,7 +7,5 @@ import ( ) func TestMain(m *testing.M) { - // gocloud.dev/blob leaks the HTTP connection even if we make sure to close all buckets. - //nolint:staticcheck - testhelper.Run(m, testhelper.WithDisabledGoroutineChecker()) + testhelper.Run(m) } |