mirror of
https://github.com/restic/restic.git
synced 2026-11-24 07:13:50 +00:00
index: replace CountedBlobSet with AssociatedSet
This commit is contained in:
1 parent
93098e9265
commit
2033c02b09
14 files changed
+472
-181
No files matched your search
@@ -7,12 +7,15 @@ import (
|
||||
"github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func TestMergeIndex(t testing.TB, mi *MasterIndex) ([]*Index, int) {
|
||||
func TestMergeIndex(t testing.TB, mi *MasterIndex) ([]*Index, int, restic.IDSet) {
|
||||
finalIndexes := mi.finalizeNotFinalIndexes()
|
||||
ids := restic.NewIDSet()
|
||||
for _, idx := range finalIndexes {
|
||||
test.OK(t, idx.SetID(restic.NewRandomID()))
|
||||
id := restic.NewRandomID()
|
||||
ids.Insert(id)
|
||||
test.OK(t, idx.SetID(id))
|
||||
}
|
||||
|
||||
test.OK(t, mi.MergeFinalIndexes())
|
||||
return finalIndexes, len(mi.idx)
|
||||
return finalIndexes, len(mi.idx), ids
|
||||
}
|
||||
Reference in new issue
Block a user