fix testcontainers docker client using the global tracer provider (#5440)

This commit is contained in:
Joe Kralicky 2025-01-24 14:55:21 -05:00 committed by GitHub
parent 6ea51149f9
commit c307ca806a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 0 deletions

View file

@ -6,8 +6,10 @@ import (
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/pomerium/pomerium/internal/telemetry/trace"
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/wait"
oteltrace "go.opentelemetry.io/otel/trace"
)
// WithTestMinIO starts a test MinIO server
@ -15,6 +17,7 @@ func WithTestMinIO(t *testing.T, bucket string, handler func(endpoint string)) {
t.Helper()
ctx := GetContext(t, maxWait)
ctx = oteltrace.ContextWithSpan(ctx, trace.ValidNoopSpan{})
container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
ContainerRequest: testcontainers.ContainerRequest{