restic/cache_test.go

24 lines
458 B
Go
Raw Normal View History

package restic_test
import (
"testing"
"github.com/restic/restic"
2015-04-09 21:15:48 +02:00
. "github.com/restic/restic/test"
)
func TestCache(t *testing.T) {
repo := SetupRepo()
defer TeardownRepo(repo)
_, err := restic.NewCache(repo, "")
2015-04-09 21:15:48 +02:00
OK(t, err)
2015-05-09 13:32:52 +02:00
arch := restic.NewArchiver(repo)
// archive some files, this should automatically cache all blobs from the snapshot
2015-06-28 13:15:35 +02:00
_, _, err = arch.Snapshot(nil, []string{BenchArchiveDirectory}, nil)
// TODO: test caching index
}