1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 01:06:39 +00:00
restic/cache_test.go
Florian Weingarten 0d9360a815 more cleanup
2015-04-29 22:33:34 -04:00

25 lines
531 B
Go

package restic_test
import (
"testing"
"github.com/restic/restic"
. "github.com/restic/restic/test"
)
func TestCache(t *testing.T) {
server := SetupBackend(t)
defer TeardownBackend(t, server)
key := SetupKey(t, server, "geheim")
server.SetKey(key)
_, err := restic.NewCache(server)
OK(t, err)
arch := restic.NewArchiver(server)
// archive some files, this should automatically cache all blobs from the snapshot
_, _, err = arch.Snapshot(nil, []string{*benchArchiveDirectory}, nil)
// TODO: test caching index
}