mirror of
https://github.com/restic/restic.git
synced 2024-12-23 16:26:11 +00:00
23 lines
458 B
Go
23 lines
458 B
Go
package restic_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/restic/restic"
|
|
. "github.com/restic/restic/test"
|
|
)
|
|
|
|
func TestCache(t *testing.T) {
|
|
repo := SetupRepo()
|
|
defer TeardownRepo(repo)
|
|
|
|
_, err := restic.NewCache(repo, "")
|
|
OK(t, err)
|
|
|
|
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
|
|
}
|