Skip to content

Commit

Permalink
Fix test by adding userID to ctx
Browse files Browse the repository at this point in the history
Signed-off-by: Annanay <[email protected]>
  • Loading branch information
annanay25 committed Dec 2, 2021
1 parent f7e95f0 commit 22739f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/ingester/instance_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
"github.com/weaveworks/common/user"
"math/rand"
"os"
"testing"
Expand Down Expand Up @@ -252,7 +253,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 22739f1

Please sign in to comment.