mirror of
https://github.com/restic/restic.git
synced 2026-11-21 04:52:42 +00:00
Merge pull request #1623 from restic/backend-relax-restrictions
backend: Relax requirement for new files
This commit is contained in:
commit
29da86b473
7 files changed
+13
-48
No files matched your search
@@ -764,14 +764,10 @@ func (s *Suite) TestBackend(t *testing.T) {
|
||||
|
||||
// test adding the first file again
|
||||
ts := testStrings[0]
|
||||
|
||||
// create blob
|
||||
h := restic.Handle{Type: tpe, Name: ts.id}
|
||||
err := b.Save(context.TODO(), h, strings.NewReader(ts.data))
|
||||
test.Assert(t, err != nil, "backend has allowed overwrite of existing blob: expected error for %v, got %v", h, err)
|
||||
|
||||
// remove and recreate
|
||||
err = s.delayedRemove(t, b, h)
|
||||
err := s.delayedRemove(t, b, h)
|
||||
test.OK(t, err)
|
||||
|
||||
// test that the blob is gone
|
||||
|
||||
Reference in new issue
Block a user