@@ -640,12 +640,12 @@ func TestDistributorQuerier_Select_CounterResets(t *testing.T) {
640
640
func TestDistributorQuerier_LabelNames (t * testing.T ) {
641
641
const mint , maxt = 0 , 10
642
642
643
- hints := & storage.LabelHints {Limit : 1 }
644
643
someMatchers := []* labels.Matcher {labels .MustNewMatcher (labels .MatchEqual , "foo" , "bar" )}
644
+ hints := & storage.LabelHints {Limit : 1 }
645
645
labelNames := []string {"foo" , "job" }
646
646
647
- t .Run ("with matchers " , func (t * testing.T ) {
648
- t .Run ("queryLabelNamesWithMatchers=true " , func (t * testing.T ) {
647
+ t .Run ("querierLabelNames " , func (t * testing.T ) {
648
+ t .Run ("with matchers " , func (t * testing.T ) {
649
649
d := & mockDistributor {}
650
650
d .On ("LabelNames" , mock .Anything , model .Time (mint ), model .Time (maxt ), & storage.LabelHints {}, someMatchers ).
651
651
Return (labelNames , nil )
@@ -659,11 +659,8 @@ func TestDistributorQuerier_LabelNames(t *testing.T) {
659
659
assert .Empty (t , warnings )
660
660
assert .Equal (t , labelNames , names )
661
661
})
662
- })
663
662
664
- t .Run ("queryLabelNamesWithMatchers=true, with limit" , func (t * testing.T ) {
665
- hints := & storage.LabelHints {Limit : 1 }
666
- t .Run ("queryLabelNamesWithMatchers=true" , func (t * testing.T ) {
663
+ t .Run ("with limit" , func (t * testing.T ) {
667
664
d := & mockDistributor {}
668
665
d .On ("LabelNames" , mock .Anything , model .Time (mint ), model .Time (maxt ), hints , []* labels.Matcher {}).
669
666
Return (labelNames [:hints .Limit ], nil )
0 commit comments