mirror of
https://github.com/restic/restic.git
synced 2026-11-20 04:26:54 +00:00
cache: move to backend package
This commit is contained in:
1 parent
80132e71d8
commit
8e5d7d719c
15 files changed
+6
-6
No files matched your search
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal/restic"
|
||||
"github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
// TestNewCache returns a cache in a temporary directory which is removed when
|
||||
// cleanup is called.
|
||||
func TestNewCache(t testing.TB) *Cache {
|
||||
dir := test.TempDir(t)
|
||||
t.Logf("created new cache at %v", dir)
|
||||
cache, err := New(restic.NewRandomID().String(), dir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return cache
|
||||
}
|
||||
Reference in new issue
Block a user