(t *testing.T)
| 3625 | } |
| 3626 | |
| 3627 | func TestBlockBaseSeriesSet(t *testing.T) { |
| 3628 | type refdSeries struct { |
| 3629 | lset labels.Labels |
| 3630 | chunks []chunks.Meta |
| 3631 | |
| 3632 | ref storage.SeriesRef |
| 3633 | } |
| 3634 | |
| 3635 | cases := []struct { |
| 3636 | series []refdSeries |
| 3637 | // Postings should be in the sorted order of the series |
| 3638 | postings []storage.SeriesRef |
| 3639 | |
| 3640 | expIdxs []int |
| 3641 | }{ |
| 3642 | { |
| 3643 | series: []refdSeries{ |
| 3644 | { |
| 3645 | lset: labels.FromStrings("a", "a"), |
| 3646 | chunks: []chunks.Meta{ |
| 3647 | {Ref: 29}, |
| 3648 | {Ref: 45}, |
| 3649 | {Ref: 245}, |
| 3650 | {Ref: 123}, |
| 3651 | {Ref: 4232}, |
| 3652 | {Ref: 5344}, |
| 3653 | {Ref: 121}, |
| 3654 | }, |
| 3655 | ref: 12, |
| 3656 | }, |
| 3657 | { |
| 3658 | lset: labels.FromStrings("a", "a", "b", "b"), |
| 3659 | chunks: []chunks.Meta{ |
| 3660 | {Ref: 82}, {Ref: 23}, {Ref: 234}, {Ref: 65}, {Ref: 26}, |
| 3661 | }, |
| 3662 | ref: 10, |
| 3663 | }, |
| 3664 | { |
| 3665 | lset: labels.FromStrings("b", "c"), |
| 3666 | chunks: []chunks.Meta{{Ref: 8282}}, |
| 3667 | ref: 1, |
| 3668 | }, |
| 3669 | { |
| 3670 | lset: labels.FromStrings("b", "b"), |
| 3671 | chunks: []chunks.Meta{ |
| 3672 | {Ref: 829}, {Ref: 239}, {Ref: 2349}, {Ref: 659}, {Ref: 269}, |
| 3673 | }, |
| 3674 | ref: 108, |
| 3675 | }, |
| 3676 | }, |
| 3677 | postings: []storage.SeriesRef{12, 13, 10, 108}, // 13 doesn't exist and should just be skipped over. |
| 3678 | expIdxs: []int{0, 1, 3}, |
| 3679 | }, |
| 3680 | { |
| 3681 | series: []refdSeries{ |
| 3682 | { |
| 3683 | lset: labels.FromStrings("a", "a", "b", "b"), |
| 3684 | chunks: []chunks.Meta{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…