mirror of
https://github.com/octoleo/restic.git
synced 2024-11-05 04:47:51 +00:00
19 lines
398 B
Go
19 lines
398 B
Go
|
package index
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/restic/restic/internal/restic"
|
||
|
"github.com/restic/restic/internal/test"
|
||
|
)
|
||
|
|
||
|
func TestMergeIndex(t testing.TB, mi *MasterIndex) ([]*Index, int) {
|
||
|
finalIndexes := mi.finalizeNotFinalIndexes()
|
||
|
for _, idx := range finalIndexes {
|
||
|
test.OK(t, idx.SetID(restic.NewRandomID()))
|
||
|
}
|
||
|
|
||
|
test.OK(t, mi.MergeFinalIndexes())
|
||
|
return finalIndexes, len(mi.idx)
|
||
|
}
|