mirror of
https://github.com/restic/restic.git
synced 2025-10-10 10:13:31 +00:00
Use "pack file" instead of "data file" (#2885)
- changed variable names, especially changed DataFile into PackFile - changed in some comments - always use "pack file" in docu
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
func saveRandomFile(t testing.TB, be restic.Backend, length int) ([]byte, restic.Handle) {
|
||||
data := test.Random(23, length)
|
||||
id := restic.Hash(data)
|
||||
handle := restic.Handle{Type: restic.DataFile, Name: id.String()}
|
||||
handle := restic.Handle{Type: restic.PackFile, Name: id.String()}
|
||||
err := be.Save(context.TODO(), handle, restic.NewByteReader(data))
|
||||
if err != nil {
|
||||
t.Fatalf("Save() error: %+v", err)
|
||||
@@ -146,7 +146,7 @@ func (s *Suite) BenchmarkSave(t *testing.B) {
|
||||
length := 1<<24 + 2123
|
||||
data := test.Random(23, length)
|
||||
id := restic.Hash(data)
|
||||
handle := restic.Handle{Type: restic.DataFile, Name: id.String()}
|
||||
handle := restic.Handle{Type: restic.PackFile, Name: id.String()}
|
||||
|
||||
rd := restic.NewByteReader(data)
|
||||
t.SetBytes(int64(length))
|
||||
|
Reference in New Issue
Block a user