Skip to content

Commit

Permalink
fix tests by removing global logger
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpionknifes committed Jun 30, 2024
1 parent cfa60ac commit d0aba47
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions bridges/otellogr/logsink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import (
"github.com/go-logr/logr"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"go.opentelemetry.io/otel/log"
"go.opentelemetry.io/otel/log/global"
"go.opentelemetry.io/otel/log/logtest"
"go.opentelemetry.io/otel/sdk/instrumentation"
)
Expand All @@ -30,9 +28,6 @@ var now = time.Now()

func TestNewLogSinkConfiguration(t *testing.T) {
t.Run("default", func(t *testing.T) {
rec := logtest.NewRecorder()
global.SetLoggerProvider(rec)

var ls *LogSink
assert.NotPanics(t, func() { ls = NewLogSink() })
assert.NotNil(t, ls)
Expand Down

0 comments on commit d0aba47

Please sign in to comment.