Skip to content

Commit

Permalink
lint, fix test by adding userID to ctx
Browse files Browse the repository at this point in the history
Signed-off-by: Annanay <annanayagarwal@gmail.com>
  • Loading branch information
annanay25 committed Dec 2, 2021
1 parent f7e95f0 commit 535263c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/ingester/instance_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ import (
"time"

"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/uber-go/atomic"
"github.com/weaveworks/common/user"

"github.com/grafana/tempo/modules/overrides"
"github.com/grafana/tempo/pkg/model"
"github.com/grafana/tempo/pkg/tempofb"
"github.com/grafana/tempo/pkg/tempopb"
"github.com/grafana/tempo/pkg/util"
"github.com/grafana/tempo/pkg/util/test"
"github.com/grafana/tempo/tempodb/search"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/uber-go/atomic"
)

func checkEqual(t *testing.T, ids [][]byte, sr *tempopb.SearchResponse) {
Expand Down Expand Up @@ -252,7 +254,9 @@ func TestInstanceSearchDoesNotRace(t *testing.T) {
})

go concurrent(func() {
_, err := i.SearchTagValues(context.Background(), tagKey)
// SearchTagValues queries now require userID in ctx
ctx := user.InjectOrgID(context.Background(), "test")
_, err := i.SearchTagValues(ctx, tagKey)
require.NoError(t, err, "error getting search tag values")
})

Expand Down

0 comments on commit 535263c

Please sign in to comment.