2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-30 00:33:57 +00:00
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 19:15:48 +00:00
. "github.com/restic/restic/test"
)
func TestCache(t *testing.T) {
repo := SetupRepo()
defer TeardownRepo(repo)
_, err := restic.NewCache(repo, "")
2015-04-09 19:15:48 +00:00
OK(t, err)
2015-05-09 11:32:52 +00:00
arch := restic.NewArchiver(repo)
// archive some files, this should automatically cache all blobs from the snapshot
2015-06-28 11:15:35 +00:00
_, _, err = arch.Snapshot(nil, []string{BenchArchiveDirectory}, nil)
// TODO: test caching index
}