From 7fe496f983e324dd128fa64abdbd224b62603d68 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 14 Oct 2017 15:56:46 +0200 Subject: [PATCH] Ensure TestDelete runs last --- internal/backend/test/tests.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/internal/backend/test/tests.go b/internal/backend/test/tests.go index 2b4b31b8a..9e88a12ba 100644 --- a/internal/backend/test/tests.go +++ b/internal/backend/test/tests.go @@ -693,8 +693,8 @@ func (s *Suite) TestBackend(t *testing.T) { } } -// TestDelete tests the Delete function. -func (s *Suite) TestDelete(t *testing.T) { +// TestZZZDelete tests the Delete function. The name ensures that this test is executed last. +func (s *Suite) TestZZZDelete(t *testing.T) { if !test.TestCleanupTempDirs { t.Skipf("not removing backend, TestCleanupTempDirs is false") } @@ -702,12 +702,7 @@ func (s *Suite) TestDelete(t *testing.T) { b := s.open(t) defer s.close(t, b) - be, ok := b.(restic.Deleter) - if !ok { - return - } - - err := be.Delete(context.TODO()) + err := b.Delete(context.TODO()) if err != nil { t.Fatalf("error deleting backend: %+v", err) }