diff --git a/internal/aws/k8s/k8sclient/endpoint_test.go b/internal/aws/k8s/k8sclient/endpoint_test.go index e55cd7eb2e6c..1b7f0cea8540 100644 --- a/internal/aws/k8s/k8sclient/endpoint_test.go +++ b/internal/aws/k8s/k8sclient/endpoint_test.go @@ -416,5 +416,6 @@ func TestNewEndpointClient(t *testing.T) { fakeClientSet := fake.NewSimpleClientset(endpointsArray...) client := newEpClient(fakeClientSet, zap.NewNop(), setOption) assert.NotNil(t, client) + client.shutdown() removeTempKubeConfig() } diff --git a/internal/aws/k8s/k8sclient/package_test.go b/internal/aws/k8s/k8sclient/package_test.go new file mode 100644 index 000000000000..5db6b66f211b --- /dev/null +++ b/internal/aws/k8s/k8sclient/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package k8sclient + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +}