Skip to content

Commit

Permalink
fix panic in test
Browse files Browse the repository at this point in the history
  • Loading branch information
electron0zero committed Oct 11, 2023
1 parent 4a00890 commit 2902871
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/overrides/user_configurable_overrides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/grafana/tempo/pkg/util/listtomap"
"github.com/grafana/tempo/tempodb/backend"
"github.com/grafana/tempo/tempodb/backend/local"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -289,6 +290,8 @@ func localUserConfigOverrides(t *testing.T, baseLimits Overrides, PerTenantOverr
baseOverrides, err := NewOverrides(baseCfg)
assert.NoError(t, err)

// have to overwrite the registry or test panics with multiple metric reg
prometheus.DefaultRegisterer = prometheus.NewRegistry()
configurableOverrides, err := newUserConfigOverrides(cfg, baseOverrides)
assert.NoError(t, err)

Expand Down

0 comments on commit 2902871

Please sign in to comment.