Skip to content

Commit

Permalink
[extension/opampextension] Enable goleak check
Browse files Browse the repository at this point in the history
  • Loading branch information
crobert-1 committed Feb 29, 2024
1 parent ce6e401 commit 0f9015d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions extension/opampextension/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
go.opentelemetry.io/collector/semconv v0.95.0
go.opentelemetry.io/otel/metric v1.23.1
go.opentelemetry.io/otel/trace v1.23.1
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.0
gopkg.in/yaml.v3 v3.0.1
)
Expand Down
1 change: 1 addition & 0 deletions extension/opampextension/opamp_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,5 @@ func TestStart(t *testing.T) {
assert.NoError(t, err)

assert.NoError(t, o.Start(context.TODO(), componenttest.NewNopHost()))
assert.NoError(t, o.Shutdown(context.TODO()))
}
14 changes: 14 additions & 0 deletions extension/opampextension/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 opampextension

import (
"testing"

"go.uber.org/goleak"
)

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

0 comments on commit 0f9015d

Please sign in to comment.