mirror of
https://github.com/restic/restic.git
synced 2025-12-03 19:31:47 +00:00
rename --no-verify-pack to --no-extra-verify
This commit is contained in:
@@ -337,7 +337,7 @@ func TestRepackWrongBlob(t *testing.T) {
|
||||
|
||||
func testRepackWrongBlob(t *testing.T, version uint) {
|
||||
// disable verification to allow adding corrupted blobs to the repository
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoVerifyPack: true})
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoExtraVerify: true})
|
||||
|
||||
seed := time.Now().UnixNano()
|
||||
rand.Seed(seed)
|
||||
@@ -363,7 +363,7 @@ func TestRepackBlobFallback(t *testing.T) {
|
||||
|
||||
func testRepackBlobFallback(t *testing.T, version uint) {
|
||||
// disable verification to allow adding corrupted blobs to the repository
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoVerifyPack: true})
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoExtraVerify: true})
|
||||
|
||||
seed := time.Now().UnixNano()
|
||||
rand.Seed(seed)
|
||||
|
||||
@@ -103,7 +103,7 @@ func testRepairBrokenPack(t *testing.T, version uint) {
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
// disable verification to allow adding corrupted blobs to the repository
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoVerifyPack: true})
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoExtraVerify: true})
|
||||
|
||||
seed := time.Now().UnixNano()
|
||||
rand.Seed(seed)
|
||||
|
||||
@@ -59,9 +59,9 @@ type Repository struct {
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
Compression CompressionMode
|
||||
PackSize uint
|
||||
NoVerifyPack bool
|
||||
Compression CompressionMode
|
||||
PackSize uint
|
||||
NoExtraVerify bool
|
||||
}
|
||||
|
||||
// CompressionMode configures if data should be compressed.
|
||||
@@ -444,7 +444,7 @@ func (r *Repository) saveAndEncrypt(ctx context.Context, t restic.BlobType, data
|
||||
}
|
||||
|
||||
func (r *Repository) verifyCiphertext(buf []byte, uncompressedLength int, id restic.ID) error {
|
||||
if r.opts.NoVerifyPack {
|
||||
if r.opts.NoExtraVerify {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -542,7 +542,7 @@ func (r *Repository) SaveUnpacked(ctx context.Context, t restic.FileType, buf []
|
||||
}
|
||||
|
||||
func (r *Repository) verifyUnpacked(buf []byte, t restic.FileType, expected []byte) error {
|
||||
if r.opts.NoVerifyPack {
|
||||
if r.opts.NoExtraVerify {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user