mirror of
https://github.com/restic/restic.git
synced 2024-12-23 00:07:25 +00:00
Ensure TestDelete runs last
This commit is contained in:
parent
e56370eb5b
commit
7fe496f983
1 changed files with 3 additions and 8 deletions
|
@ -693,8 +693,8 @@ func (s *Suite) TestBackend(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestDelete tests the Delete function.
|
// TestZZZDelete tests the Delete function. The name ensures that this test is executed last.
|
||||||
func (s *Suite) TestDelete(t *testing.T) {
|
func (s *Suite) TestZZZDelete(t *testing.T) {
|
||||||
if !test.TestCleanupTempDirs {
|
if !test.TestCleanupTempDirs {
|
||||||
t.Skipf("not removing backend, TestCleanupTempDirs is false")
|
t.Skipf("not removing backend, TestCleanupTempDirs is false")
|
||||||
}
|
}
|
||||||
|
@ -702,12 +702,7 @@ func (s *Suite) TestDelete(t *testing.T) {
|
||||||
b := s.open(t)
|
b := s.open(t)
|
||||||
defer s.close(t, b)
|
defer s.close(t, b)
|
||||||
|
|
||||||
be, ok := b.(restic.Deleter)
|
err := b.Delete(context.TODO())
|
||||||
if !ok {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
err := be.Delete(context.TODO())
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("error deleting backend: %+v", err)
|
t.Fatalf("error deleting backend: %+v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue