Update package model/textparse tests for new labels.Labels type

We don't want to touch the result labels now we create them differently.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
Bryan Boreham 2022-03-09 22:14:19 +00:00
parent 1f04899ae3
commit 8d350d9e0c
3 changed files with 2 additions and 7 deletions

View File

@ -246,7 +246,6 @@ foo_total 17.0 1520879607.789 # {xx="yy"} 5`
require.Equal(t, true, found)
require.Equal(t, *exp[i].e, e)
}
res = res[:0]
case EntryType:
m, typ := p.Type()

View File

@ -192,7 +192,6 @@ testmetric{label="\"bar\""} 1`
require.Equal(t, exp[i].t, ts)
require.Equal(t, exp[i].v, v)
require.Equal(t, exp[i].lset, res)
res = res[:0]
case EntryType:
m, typ := p.Type()
@ -414,7 +413,7 @@ func BenchmarkParse(b *testing.B) {
case EntrySeries:
m, _, _ := p.Series()
res := make(labels.Labels, 0, 5)
var res labels.Labels
p.Metric(&res)
total += len(m)
@ -426,7 +425,7 @@ func BenchmarkParse(b *testing.B) {
})
b.Run(parserName+"/decode-metric-reuse/"+fn, func(b *testing.B) {
total := 0
res := make(labels.Labels, 0, 5)
var res labels.Labels
b.SetBytes(int64(len(buf) / promtestdataSampleCount))
b.ReportAllocs()
@ -451,7 +450,6 @@ func BenchmarkParse(b *testing.B) {
total += len(m)
i++
res = res[:0]
}
}
}

View File

@ -630,7 +630,6 @@ metric: <
require.Equal(t, true, found)
require.Equal(t, exp[i].e[0], e)
}
res = res[:0]
case EntryHistogram:
m, ts, shs, fhs := p.Histogram()
@ -642,7 +641,6 @@ metric: <
require.Equal(t, exp[i].t, int64(0))
}
require.Equal(t, exp[i].lset, res)
res = res[:0]
require.Equal(t, exp[i].m, string(m))
if shs != nil {
require.Equal(t, exp[i].shs, shs)