From e0867c968204bc3c18fc413bb24594eae7b959a5 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 29 Jan 2021 22:52:26 +0100 Subject: [PATCH] backend: try to cleanup test leftovers --- internal/backend/test/tests.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/backend/test/tests.go b/internal/backend/test/tests.go index a35b75e5a..ae9b58677 100644 --- a/internal/backend/test/tests.go +++ b/internal/backend/test/tests.go @@ -577,13 +577,15 @@ func (s *Suite) TestSaveError(t *testing.T) { }() length := rand.Intn(1<<23) + 200000 - data := test.Random(23, length) + data := test.Random(24, length) var id restic.ID copy(id[:], data) // test that incomplete uploads fail h := restic.Handle{Type: restic.PackFile, Name: id.String()} err := b.Save(context.TODO(), h, &incompleteByteReader{ByteReader: *restic.NewByteReader(data)}) + // try to delete possible leftovers + _ = s.delayedRemove(t, b, h) if err == nil { t.Fatal("incomplete upload did not fail") }