From 677d45ffc63859d9319b4d113e0b8bedd3959406 Mon Sep 17 00:00:00 2001 From: Will Chandler Date: Tue, 29 Aug 2023 09:10:12 -0400 Subject: Add missing TestMain calls Many packages fail to call `TestMain` as part of their tests, which is required to invoke our goroutine leak detector. Create a new `testhelper_test.go` file and include a `TestMain` function that executes `testhelper.Run`. --- cmd/gitaly-gpg/testhelper_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 cmd/gitaly-gpg/testhelper_test.go (limited to 'cmd') diff --git a/cmd/gitaly-gpg/testhelper_test.go b/cmd/gitaly-gpg/testhelper_test.go new file mode 100644 index 000000000..432115dc0 --- /dev/null +++ b/cmd/gitaly-gpg/testhelper_test.go @@ -0,0 +1,11 @@ +package main + +import ( + "testing" + + "gitlab.com/gitlab-org/gitaly/v16/internal/testhelper" +) + +func TestMain(m *testing.M) { + testhelper.Run(m) +} -- cgit v1.2.3