forked from TrueCloudLab/restic
Allow overwriting the IndexFull function for tests
This commit is contained in:
parent
af0d6f58b9
commit
4b1a2caea7
2 changed files with 3 additions and 3 deletions
|
@ -64,8 +64,8 @@ const (
|
|||
indexMaxAge = 15 * time.Minute
|
||||
)
|
||||
|
||||
// Full returns true iff the index is "full enough" to be saved as a preliminary index.
|
||||
func (idx *Index) Full() bool {
|
||||
// IndexFull returns true iff the index is "full enough" to be saved as a preliminary index.
|
||||
var IndexFull = func(idx *Index) bool {
|
||||
idx.m.Lock()
|
||||
defer idx.m.Unlock()
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ func (mi *MasterIndex) FullIndexes() []*Index {
|
|||
continue
|
||||
}
|
||||
|
||||
if idx.Full() {
|
||||
if IndexFull(idx) {
|
||||
debug.Log("MasterIndex.FullIndexes", "index %p is full", idx)
|
||||
list = append(list, idx)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue