diff --git a/tsdb/ooo_head_read_test.go b/tsdb/ooo_head_read_test.go index 8dca1ea59..b489c6e57 100644 --- a/tsdb/ooo_head_read_test.go +++ b/tsdb/ooo_head_read_test.go @@ -379,23 +379,15 @@ func TestOOOHeadChunkReader_LabelValues(t *testing.T) { app := head.Appender(context.Background()) // Add in-order samples - _, err := app.Append(0, labels.Labels{ - {Name: "foo", Value: "bar1"}, - }, 100, 1) + _, err := app.Append(0, labels.FromStrings("foo", "bar1"), 100, 1) require.NoError(t, err) - _, err = app.Append(0, labels.Labels{ - {Name: "foo", Value: "bar2"}, - }, 100, 2) + _, err = app.Append(0, labels.FromStrings("foo", "bar2"), 100, 2) require.NoError(t, err) // Add ooo samples for those series - _, err = app.Append(0, labels.Labels{ - {Name: "foo", Value: "bar1"}, - }, 90, 1) + _, err = app.Append(0, labels.FromStrings("foo", "bar1"), 90, 1) require.NoError(t, err) - _, err = app.Append(0, labels.Labels{ - {Name: "foo", Value: "bar2"}, - }, 90, 2) + _, err = app.Append(0, labels.FromStrings("foo", "bar2"), 90, 2) require.NoError(t, err) require.NoError(t, app.Commit()) diff --git a/tsdb/querier_test.go b/tsdb/querier_test.go index 3b44cef51..e6a75da2f 100644 --- a/tsdb/querier_test.go +++ b/tsdb/querier_test.go @@ -2160,7 +2160,7 @@ func TestBlockBaseSeriesSet(t *testing.T) { { series: []refdSeries{ { - lset: labels.New([]labels.Label{{Name: "a", Value: "a"}}...), + lset: labels.FromStrings("a", "a"), chunks: []chunks.Meta{ {Ref: 29}, {Ref: 45}, @@ -2173,19 +2173,19 @@ func TestBlockBaseSeriesSet(t *testing.T) { ref: 12, }, { - lset: labels.New([]labels.Label{{Name: "a", Value: "a"}, {Name: "b", Value: "b"}}...), + lset: labels.FromStrings("a", "a", "b", "b"), chunks: []chunks.Meta{ {Ref: 82}, {Ref: 23}, {Ref: 234}, {Ref: 65}, {Ref: 26}, }, ref: 10, }, { - lset: labels.New([]labels.Label{{Name: "b", Value: "c"}}...), + lset: labels.FromStrings("b", "c"), chunks: []chunks.Meta{{Ref: 8282}}, ref: 1, }, { - lset: labels.New([]labels.Label{{Name: "b", Value: "b"}}...), + lset: labels.FromStrings("b", "b"), chunks: []chunks.Meta{ {Ref: 829}, {Ref: 239}, {Ref: 2349}, {Ref: 659}, {Ref: 269}, }, @@ -2198,14 +2198,14 @@ func TestBlockBaseSeriesSet(t *testing.T) { { series: []refdSeries{ { - lset: labels.New([]labels.Label{{Name: "a", Value: "a"}, {Name: "b", Value: "b"}}...), + lset: labels.FromStrings("a", "a", "b", "b"), chunks: []chunks.Meta{ {Ref: 82}, {Ref: 23}, {Ref: 234}, {Ref: 65}, {Ref: 26}, }, ref: 10, }, { - lset: labels.New([]labels.Label{{Name: "b", Value: "c"}}...), + lset: labels.FromStrings("b", "c"), chunks: []chunks.Meta{{Ref: 8282}}, ref: 3, },