storage: in tests use labels.FromStrings

Replacing code which assumes the internal structure of `Labels`.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
pull/11292/head
Bryan Boreham 3 years ago committed by Julien Pivotto
parent 176fa38e76
commit ad1c257899

@ -696,7 +696,7 @@ var result []tsdbutil.Sample
func makeSeriesSet(numSeries, numSamples int) SeriesSet { func makeSeriesSet(numSeries, numSamples int) SeriesSet {
series := []Series{} series := []Series{}
for j := 0; j < numSeries; j++ { for j := 0; j < numSeries; j++ {
labels := labels.Labels{{Name: "foo", Value: fmt.Sprintf("bar%d", j)}} labels := labels.FromStrings("foo", fmt.Sprintf("bar%d", j))
samples := []tsdbutil.Sample{} samples := []tsdbutil.Sample{}
for k := 0; k < numSamples; k++ { for k := 0; k < numSamples; k++ {
samples = append(samples, sample{t: int64(k), v: float64(k)}) samples = append(samples, sample{t: int64(k), v: float64(k)})

Loading…
Cancel
Save