restic/cache_test.go

24 lines
463 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) {
2015-05-09 13:32:52 +02:00
repo := SetupRepo(t)
defer TeardownRepo(t, 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
_, _, err = arch.Snapshot(nil, []string{*benchArchiveDirectory}, nil)
// TODO: test caching index
}