mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-22 21:47:16 +02:00
fix testcontainers docker client using the global tracer provider (#5440)
This commit is contained in:
parent
6ea51149f9
commit
c307ca806a
3 changed files with 38 additions and 0 deletions
|
@ -8,8 +8,10 @@ import (
|
|||
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/pomerium/pomerium/internal/telemetry/trace"
|
||||
"github.com/testcontainers/testcontainers-go"
|
||||
"github.com/testcontainers/testcontainers-go/wait"
|
||||
oteltrace "go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
// WithTestPostgres starts a postgres database.
|
||||
|
@ -17,6 +19,7 @@ func WithTestPostgres(t *testing.T, handler func(dsn string)) {
|
|||
t.Helper()
|
||||
|
||||
ctx := GetContext(t, maxWait)
|
||||
ctx = oteltrace.ContextWithSpan(ctx, trace.ValidNoopSpan{})
|
||||
|
||||
container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
ContainerRequest: testcontainers.ContainerRequest{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue