backend/cache: use backend types not restic types (#21860)

This commit is contained in:
Michael Eischer
2026-06-10 22:45:39 +02:00
committed by GitHub
parent a15b1579ff
commit c745f810b3
7 changed files with 41 additions and 49 deletions
+3 -2
View File
@@ -3,16 +3,17 @@ package cache
import (
"testing"
"github.com/restic/restic/internal/restic"
"github.com/restic/restic/internal/test"
)
const testCacheID = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
// 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)
cache, err := New(testCacheID, dir)
if err != nil {
t.Fatal(err)
}