mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 02:48:55 +00:00
Ensure TestDelete runs last
This commit is contained in:
parent
e56370eb5b
commit
7fe496f983
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user