diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers_test.go b/receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers_test.go index 16e9de8d6b9d..69551f600db8 100644 --- a/receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers_test.go +++ b/receiver/gitproviderreceiver/internal/scraper/githubscraper/helpers_test.go @@ -649,6 +649,7 @@ func TestGetContributors(t *testing.T) { ghs.cfg.GitHubOrg = tc.org server := httptest.NewServer(tc.server) + defer func() { server.Close() }() client := github.NewClient(nil) url, _ := url.Parse(server.URL + "/api-v3" + "/") diff --git a/receiver/gitproviderreceiver/internal/scraper/githubscraper/package_test.go b/receiver/gitproviderreceiver/internal/scraper/githubscraper/package_test.go new file mode 100644 index 000000000000..ed1a614b34f2 --- /dev/null +++ b/receiver/gitproviderreceiver/internal/scraper/githubscraper/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package githubscraper + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +}