mirror of
https://github.com/restic/restic.git
synced 2026-10-18 15:38:12 +00:00
backend: extract readerat from restic package
This commit is contained in:
1 parent
c44b21d366
commit
9729e6d7ef
4 files changed
+14
-11
No files matched your search
@@ -9,6 +9,7 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/backend/mem"
|
||||
"github.com/restic/restic/internal/crypto"
|
||||
"github.com/restic/restic/internal/pack"
|
||||
@@ -128,7 +129,7 @@ func TestUnpackReadSeeker(t *testing.T) {
|
||||
|
||||
handle := restic.Handle{Type: restic.PackFile, Name: id.String()}
|
||||
rtest.OK(t, b.Save(context.TODO(), handle, restic.NewByteReader(packData, b.Hasher())))
|
||||
verifyBlobs(t, bufs, k, restic.ReaderAt(context.TODO(), b, handle), packSize)
|
||||
verifyBlobs(t, bufs, k, backend.ReaderAt(context.TODO(), b, handle), packSize)
|
||||
}
|
||||
|
||||
func TestShortPack(t *testing.T) {
|
||||
@@ -141,5 +142,5 @@ func TestShortPack(t *testing.T) {
|
||||
|
||||
handle := restic.Handle{Type: restic.PackFile, Name: id.String()}
|
||||
rtest.OK(t, b.Save(context.TODO(), handle, restic.NewByteReader(packData, b.Hasher())))
|
||||
verifyBlobs(t, bufs, k, restic.ReaderAt(context.TODO(), b, handle), packSize)
|
||||
verifyBlobs(t, bufs, k, backend.ReaderAt(context.TODO(), b, handle), packSize)
|
||||
}
|
||||
Reference in new issue
Block a user