Skip to content
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
4 changes: 3 additions & 1 deletion internal/docker/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ func TestEventLoopHandlesError(t *testing.T) {
assert.NotNil(t, cli)
assert.NoError(t, err)

go cli.ContainerEventLoop(context.Background())
ctx, cancel := context.WithCancel(context.Background())
go cli.ContainerEventLoop(ctx)
defer cancel()

assert.Eventually(t, func() bool {
for _, l := range logs.All() {
Expand Down
1 change: 1 addition & 0 deletions internal/docker/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/docker/docker v25.0.5+incompatible
github.com/gobwas/glob v0.2.3
github.com/stretchr/testify v1.9.0
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.0
)

Expand Down
14 changes: 14 additions & 0 deletions internal/docker/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 docker

import (
"testing"

"go.uber.org/goleak"
)

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