Merge final indexes together for faster index access

This commit is contained in:
Alexander Weiss
2020-07-04 07:06:14 +02:00
committed by Michael Eischer
parent 3b7a3711e6
commit e388d962a5
5 changed files with 90 additions and 20 deletions

View File

@@ -135,10 +135,9 @@ func TestIndexSerialize(t *testing.T) {
id := restic.NewRandomID()
rtest.OK(t, idx.SetID(id))
id2, err := idx.ID()
ids, err := idx.IDs()
rtest.OK(t, err)
rtest.Assert(t, id2.Equal(id),
"wrong ID returned: want %v, got %v", id, id2)
rtest.Equals(t, restic.IDs{id}, ids)
idx3, err := repository.DecodeIndex(wr3.Bytes())
rtest.OK(t, err)