Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][pkg/stanza/operator/helper] Enable goleak check #31092

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/stanza/operator/helper/ip_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func TestIPResolverCacheLookup(t *testing.T) {
}

require.Equal(t, "definitely invalid hostname", resolver.GetHostFromIP("127.0.0.1"))
resolver.Stop()
}

func TestIPResolverCacheInvalidation(t *testing.T) {
Expand Down Expand Up @@ -45,6 +46,7 @@ func TestIPResolver100Hits(t *testing.T) {
for i := 0; i < 100; i++ {
require.Equal(t, "definitely invalid hostname", resolver.GetHostFromIP("127.0.0.1"))
}
resolver.Stop()
}

func TestIPResolverWithMultipleStops(_ *testing.T) {
Expand Down
14 changes: 14 additions & 0 deletions pkg/stanza/operator/helper/package_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package helper

import (
"testing"

"go.uber.org/goleak"
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}
Loading