mirror of
https://github.com/octoleo/restic.git
synced 2024-11-16 01:57:10 +00:00
24 lines
473 B
Go
24 lines
473 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)
|
|
|
|
_, 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
|
|
}
|