@@ -42,7 +42,7 @@ func RunWithWALCheckpointerWithFiles(t *testing.T, names ...interface{}) {
4242
4343func Test_emptyDir (t * testing.T ) {
4444 RunWithWALCheckpointerWithFiles (t , func (t * testing.T , wal * DiskWAL , checkpointer * Checkpointer ) {
45- latestCheckpoint , err := checkpointer .LatestCheckpoint ()
45+ latestCheckpoint , err := checkpointer .LatestCheckpointV6 ()
4646 require .NoError (t , err )
4747 require .Equal (t , - 1 , latestCheckpoint )
4848
@@ -57,7 +57,7 @@ func Test_emptyDir(t *testing.T) {
5757// Prometheus WAL require files to be 8 characters, otherwise it gets confused
5858func Test_noCheckpoints (t * testing.T ) {
5959 RunWithWALCheckpointerWithFiles (t , "00000000" , "00000001" , "00000002" , func (t * testing.T , wal * DiskWAL , checkpointer * Checkpointer ) {
60- latestCheckpoint , err := checkpointer .LatestCheckpoint ()
60+ latestCheckpoint , err := checkpointer .LatestCheckpointV6 ()
6161 require .NoError (t , err )
6262 require .Equal (t , - 1 , latestCheckpoint )
6363
@@ -70,7 +70,7 @@ func Test_noCheckpoints(t *testing.T) {
7070
7171func Test_someCheckpoints (t * testing.T ) {
7272 RunWithWALCheckpointerWithFiles (t , "00000000" , "00000001" , "00000002" , "00000003" , "00000004" , "00000005" , "checkpoint.00000002" , func (t * testing.T , wal * DiskWAL , checkpointer * Checkpointer ) {
73- latestCheckpoint , err := checkpointer .LatestCheckpoint ()
73+ latestCheckpoint , err := checkpointer .LatestCheckpointV6 ()
7474 require .NoError (t , err )
7575 require .Equal (t , 2 , latestCheckpoint )
7676
@@ -83,7 +83,7 @@ func Test_someCheckpoints(t *testing.T) {
8383
8484func Test_loneCheckpoint (t * testing.T ) {
8585 RunWithWALCheckpointerWithFiles (t , "checkpoint.00000005" , func (t * testing.T , wal * DiskWAL , checkpointer * Checkpointer ) {
86- latestCheckpoint , err := checkpointer .LatestCheckpoint ()
86+ latestCheckpoint , err := checkpointer .LatestCheckpointV6 ()
8787 require .NoError (t , err )
8888 require .Equal (t , 5 , latestCheckpoint )
8989
@@ -96,15 +96,15 @@ func Test_loneCheckpoint(t *testing.T) {
9696
9797func Test_lastCheckpointIsFoundByNumericValue (t * testing.T ) {
9898 RunWithWALCheckpointerWithFiles (t , "checkpoint.00000005" , "checkpoint.00000004" , "checkpoint.00000006" , "checkpoint.00000002" , "checkpoint.00000001" , func (t * testing.T , wal * DiskWAL , checkpointer * Checkpointer ) {
99- latestCheckpoint , err := checkpointer .LatestCheckpoint ()
99+ latestCheckpoint , err := checkpointer .LatestCheckpointV6 ()
100100 require .NoError (t , err )
101101 require .Equal (t , 6 , latestCheckpoint )
102102 })
103103}
104104
105105func Test_checkpointWithoutPrecedingSegments (t * testing.T ) {
106106 RunWithWALCheckpointerWithFiles (t , "checkpoint.00000005" , "00000006" , "00000007" , func (t * testing.T , wal * DiskWAL , checkpointer * Checkpointer ) {
107- latestCheckpoint , err := checkpointer .LatestCheckpoint ()
107+ latestCheckpoint , err := checkpointer .LatestCheckpointV6 ()
108108 require .NoError (t , err )
109109 require .Equal (t , 5 , latestCheckpoint )
110110
@@ -117,7 +117,7 @@ func Test_checkpointWithoutPrecedingSegments(t *testing.T) {
117117
118118func Test_checkpointWithSameSegment (t * testing.T ) {
119119 RunWithWALCheckpointerWithFiles (t , "checkpoint.00000005" , "00000005" , "00000006" , "00000007" , func (t * testing.T , wal * DiskWAL , checkpointer * Checkpointer ) {
120- latestCheckpoint , err := checkpointer .LatestCheckpoint ()
120+ latestCheckpoint , err := checkpointer .LatestCheckpointV6 ()
121121 require .NoError (t , err )
122122 require .Equal (t , 5 , latestCheckpoint )
123123
@@ -139,7 +139,7 @@ func Test_listingCheckpoints(t *testing.T) {
139139
140140func Test_NoGapBetweenSegmentsAndLastCheckpoint (t * testing.T ) {
141141 RunWithWALCheckpointerWithFiles (t , "checkpoint.00000004" , "00000006" , "00000007" , func (t * testing.T , wal * DiskWAL , checkpointer * Checkpointer ) {
142- latestCheckpoint , err := checkpointer .LatestCheckpoint ()
142+ latestCheckpoint , err := checkpointer .LatestCheckpointV6 ()
143143 require .NoError (t , err )
144144 require .Equal (t , 4 , latestCheckpoint )
145145
0 commit comments