From a7737ab3acd4c1c298176fd4d8e99b7359d4e223 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Mon, 9 Oct 2023 10:02:30 +0200 Subject: [PATCH] Fix PostingsCloner tests Signed-off-by: Arve Knudsen --- tsdb/index/postings_test.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tsdb/index/postings_test.go b/tsdb/index/postings_test.go index 4cc2bd9a2..7a5677c0d 100644 --- a/tsdb/index/postings_test.go +++ b/tsdb/index/postings_test.go @@ -990,11 +990,9 @@ func TestPostingsCloner(t *testing.T) { check: func(t testing.TB, pc *PostingsCloner) { p1 := pc.Clone() require.False(t, p1.Seek(9)) - require.Equal(t, storage.SeriesRef(0), p1.At()) p2 := pc.Clone() require.False(t, p2.Seek(10)) - require.Equal(t, storage.SeriesRef(0), p2.At()) }, }, { @@ -1002,7 +1000,6 @@ func TestPostingsCloner(t *testing.T) { check: func(t testing.TB, pc *PostingsCloner) { p1 := pc.Clone() require.False(t, p1.Seek(9)) - require.Equal(t, storage.SeriesRef(0), p1.At()) p2 := pc.Clone() require.True(t, p2.Seek(2)) @@ -1070,21 +1067,12 @@ func TestPostingsCloner(t *testing.T) { require.Equal(t, storage.SeriesRef(4), p2.At()) }, }, - { - name: "at before call of next shouldn't panic", - check: func(t testing.TB, pc *PostingsCloner) { - p := pc.Clone() - require.Equal(t, storage.SeriesRef(0), p.At()) - }, - }, { name: "ensure a failed seek doesn't allow more next calls", check: func(t testing.TB, pc *PostingsCloner) { p := pc.Clone() require.False(t, p.Seek(9)) - require.Equal(t, storage.SeriesRef(0), p.At()) require.False(t, p.Next()) - require.Equal(t, storage.SeriesRef(0), p.At()) }, }, } {